Skip to content

Do not escape actual template literals on emit #32844

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

Merged
merged 1 commit into from
Aug 13, 2019
Merged

Conversation

rbuckton
Copy link
Contributor

Fixes a few related problems:

  • compose was used incorrectly to compose escapeString with escapeTemplateSubstitution, since compose only pipes a single argument through so the quoteChar parameter was lost.
  • The backtickQuoteEscapedCharsRegExp would escape characters that should remain unescaped as they are legal within a template literal.
  • NoSubstitutionTemplateLiteral, TemplateHead, etc. did not provide a way to specify the "raw" source text for a purely synthetic node.

Fixes #18738

@rbuckton
Copy link
Contributor Author

@weswigham any more feedback?

@RyanCavanaugh RyanCavanaugh merged commit a74f109 into master Aug 13, 2019
@rbuckton rbuckton deleted the fix18738 branch December 16, 2019 22:57
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.

Transform: unable to control or preserve whitespace in substituted template spans
3 participants