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

fix(ecmascript/lexer): Normalize \r\n and \r to \n in template literals #1286

Merged
merged 3 commits into from
Dec 21, 2020

Conversation

Liamolucko
Copy link
Contributor

According to https://tc39.es/ecma262/#sec-static-semantics-tv-and-trv, '<CR><LF> and <CR> LineTerminatorSequences are normalized to <LF> for both TV and TRV.' This PR implements that.

This is the cause of denoland/deno#8746.

@kdy1
Copy link
Member

kdy1 commented Dec 21, 2020

I'll merge this after inlining parser tsc tests.
It's currently git pull-ed from ci, but it makes checking pr too hard.

@kdy1
Copy link
Member

kdy1 commented Dec 21, 2020

Thanks!

@kdy1 kdy1 changed the title fix(lexer): Normalize \r\n and \r to \n in template literals fix(ecmascript/lexer): Normalize \r\n and \r to \n in template literals Dec 21, 2020
@kdy1 kdy1 merged commit 576fb6a into swc-project:master Dec 21, 2020
@kdy1 kdy1 added this to the v1.2.41 milestone Dec 21, 2020
@Liamolucko Liamolucko deleted the normalize_tpl_carriage_return branch December 21, 2020 22:56
@swc-project swc-project locked as resolved and limited conversation to collaborators Nov 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants