-
Notifications
You must be signed in to change notification settings - Fork 1k
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
"{{" without whitespace after is not treated as code #135
Labels
Comments
Block comments FTW! |
The above solution doesn't work when The code: dot.templateSettings.strip = true;
dot.templateSettings.append = false;
dot.templateSettings.selfcontained = false;
var template = '' +
'{{/* Some comment*/}}\n' +
'Hello\n' +
';';
var compiled = dot.template(template, undefined, {});
console.log(compiled({})); produces:
Note: I have posted this same comment on #165. |
epoberezkin
changed the title
remove line style comments prior to executing the whitespace strip
"{{" without whitespace after is not treated as code.
Oct 30, 2016
epoberezkin
changed the title
"{{" without whitespace after is not treated as code.
"{{" without whitespace after is not treated as code
Oct 30, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The issue is that when you strip whitespace on a file that has line style comments
i.e. //commnted text
the comments will almost always cause unintended side effects, like client side javascript errors
The text was updated successfully, but these errors were encountered: