Skip to content

Fix bug with multiline string in CRLF terminated files (#4893) #5318

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 2 commits into from
Sep 14, 2023

Conversation

tikotzky
Copy link
Contributor

What does this PR do?

correctly handles escaped CRLF line endings in multiline strings

fixes #4893

  • Documentation or TypeScript types (it's okay to leave the rest blank in this case)
  • Code changes

How did you verify your code works?

I manually tested against three files

  • terminated with CRLF
  • terminated with CR
  • terminated with LF

Pre change it errored on CRLF and passed on the other 2
Post change it passes on all 3

I also added an automated test for the failing CRLF scenario.

@Jarred-Sumner Jarred-Sumner merged commit 088bea0 into oven-sh:main Sep 14, 2023
@Jarred-Sumner
Copy link
Collaborator

Thank you

@tikotzky
Copy link
Contributor Author

Thank you for the quick review and merge!

paperclover pushed a commit to SuperAuguste/bun that referenced this pull request Sep 18, 2023
…oven-sh#5318)

* Fix bug with multiline string in CRLF terminated files (oven-sh#4893)

* add test for oven-sh#4893
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.

Unterminated string literal
2 participants