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

Escape unicode newlines when compiling #1126

Merged
merged 1 commit into from Sep 4, 2018
Merged

Escape unicode newlines when compiling #1126

merged 1 commit into from Sep 4, 2018

Conversation

TheDancingCode
Copy link
Contributor

Summary

Proposed change:

Escapes the \u2028 unicode newline character to avoid errors when compiling.

Closes #126, closes #736 .

Checklist

I've completed the checklist below to ensure I didn't forget anything. This makes reviewing this PR as easy as possible for the maintainers. And it gets this change released as soon as possible.

@codecov-io
Copy link

codecov-io commented Jul 12, 2018

Codecov Report

Merging #1126 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1126      +/-   ##
==========================================
+ Coverage   89.93%   89.94%   +<.01%     
==========================================
  Files          22       22              
  Lines        2982     2983       +1     
==========================================
+ Hits         2682     2683       +1     
  Misses        300      300
Impacted Files Coverage Δ
nunjucks/src/compiler.js 95.51% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9a0ce36...4d4dc40. Read the comment docs.

@fdintino
Copy link
Collaborator

fdintino commented Sep 4, 2018

Thanks for this! Apologies for the delay in merging, it escaped my notice back in July.

@fdintino fdintino merged commit 39bb716 into mozilla:master Sep 4, 2018
@fengmk2
Copy link

fengmk2 commented Sep 6, 2018

unicode newlines worked on node >= 10

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.

SyntaxError: Unexpected token ILLEGAL with unicode in HTML template Some characters break Nunjucks
4 participants