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

Some characters break Nunjucks #126

Closed
devoidfury opened this issue Aug 23, 2013 · 6 comments · Fixed by #1126 · May be fixed by dubscratch/MagicMirror#16
Closed

Some characters break Nunjucks #126

devoidfury opened this issue Aug 23, 2013 · 6 comments · Fixed by #1126 · May be fixed by dubscratch/MagicMirror#16
Labels

Comments

@devoidfury
Copy link
Contributor

A U+2028 character (there may be others) in a template will cause nunjucks to throw "SyntaxError: Unexpected token ILLEGAL". Sometimes these sneaky beasts will work their way into copy.

I understand if they cause an issue and throw or warn, but it should be handled better.

Tested on 0.1.10 and 0.1.9, broken in both.

EDIT: fixed character above; error happens regardless of where it is in the template.

@jlongster
Copy link
Contributor

Oh, that's not good. Sounds like you have a test case; can you attach a template that this happens with? Once we have that I'm sure we can track it down.

@devoidfury
Copy link
Contributor Author

In the original issue text I had listed the character surrounded by angle brackets, but github seems to have stripped it out, sorry I didn't notice. U+2028

@garygreen garygreen added the bug label Oct 25, 2014
@jlongster
Copy link
Contributor

I think I remember fixing this bug in another one, please reopen if it still exists

@Primajin
Copy link

Primajin commented Jul 1, 2016

I am still having this issue with the U+2028 Character breaking the build :(
I managed to replace it with a text editor, but was scratching my head for a really long time before i found this issue here.

I am using gulp-nunjucks-html @ 2.0.0

@smohadjer
Copy link

smohadjer commented May 20, 2018

I'm using gulp-nunjucks-render 2.2.2 and I get this error. The copy throwing error is below. There seems to be a character after dash at the end of sentence that breaks nunjucks.

Beim Zugriff auf unser Internetangebot erfassen wir folgende Daten in einer Protokolldatei:

-

@fdintino
Copy link
Collaborator

I've confirmed this issue. Re-opening.

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