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

Whitespace arround tags #16

Closed
vdboor opened this issue Feb 9, 2010 · 2 comments
Closed

Whitespace arround tags #16

vdboor opened this issue Feb 9, 2010 · 2 comments

Comments

@vdboor
Copy link
Contributor

vdboor commented Feb 9, 2010

When template tags are indented with the HTML code, the HTML tags get double indention. I find this output ugly, and would like to see it differently.

I think the following would lead to much to both clean template code and clean output.

  • when the full line has a template tag, pretend the full line doesn't exist.
  • if there is other code at the line, preserve whitespace; pretend the template tag didn't exist.

I hope you agree :)

@speedmax
Copy link
Owner

H2o supports a striping tag format

For example
if you want to strip whitespace on the left, u can do this

{%- tag_name %}

It works for right hand side too.

Cheers

@vdboor
Copy link
Contributor Author

vdboor commented Feb 10, 2010

Sounds like a solution to me :)

With the latest git checkout, I do get an exception:

Uncaught exception 'H2o_Error' with message '- tag doesn't exist'

I'm using a {%- for .. in %} loop.

This issue was closed.
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

No branches or pull requests

2 participants