-
Notifications
You must be signed in to change notification settings - Fork 225
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
Is there a way to not insert a line feed like ejs? #89
Comments
Not currently, but this is one of the things I'd like to support in Stencil 1.0. Haven't given though on the best way to solve this, potentially using The are many behaviours using both There has been previous discussion in #22, #32 and #85. I didn't like some of the other solutions because they change the behaviour for all tokens which may not be desired for some types of templates or tokens. For these reasons I was personally leaning towards supporting whitespace/newline control like Jinja2/ejs. /cc @AliSoftware |
@kylef |
@kylef I started implementing Jinja2 behavior, and I think I'm pretty far along. What I've done so far is parse white-space controlling information ("{%+", "{%-", "-%}", and "+%}") for I have this working in "for", "if", and "ifnot" tags (I believe).
Let me know if you'd rather me just comment on this in a PR. Thanks, and sorry if this is coming out of left field! Here's my implementation so far: https://github.com/bejar37/Stencil/tree/NewlineBehavior /cc @AliSoftware @muukii |
Would love to see this. I currently have some macros which I've had to define on a single line. (Think automated generation of function parameters.) This addition would complete the picture, for me. |
Is there a way to not insert a line feed like ejs?
-%>
The text was updated successfully, but these errors were encountered: