Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Produce source mappings for Html #8069

Closed
wants to merge 9 commits into from

Conversation

davidwengier
Copy link
Member

@davidwengier davidwengier commented Jan 4, 2023

This PR is the first step towards solving #7349, #7891 and #7564

Importantly, it doesn't actually solve any of those issues, as there is nothing that deliberately directly consumes the Html source mappings, nor does it take advantage of the capability by changing how the Html document is actually generated, but I figured that can come in other separate PRs. Formatting in particular is broken by having it map document edits, presumably because the Html formatting system was designed to work around not having them, and changing the generation in any way breaks formatting, so thats the next thing to follow up with.

Reviewing commit by commit is once again recommended, and you can skip the test output changes, and some of the plumbing (last and 3rd last commits, respectively). In general the theory is:

  • Create an interface for a generated document, and have RazorCSharpDocument and RazorHtmlDocument implement it
  • Add source mappings to that interface
  • Make the document mapping service work on the new IRazorGeneratedDocument interface, rather than assuming it only ever works for C#
  • Produce html source mappings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant