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 issue with handlebars parser. #10

Open
patriksvensson opened this issue Jul 29, 2014 · 2 comments
Open

Whitespace issue with handlebars parser. #10

patriksvensson opened this issue Jul 29, 2014 · 2 comments

Comments

@patriksvensson
Copy link

The handlebars parser do not remove whitespace that tags occupy.
Consider the following example:

{{#each Categories}}
{{#if HasName }}
{{Name}}
{{/if}}
{{Description}}
{{/each}}

Will render the following for a category without a name:



The description

This is no problem when generating HTML, but it's a problem for other formats that are sensitive to new lines such as markdown.

@csainty
Copy link
Owner

csainty commented Jul 30, 2014

Yeah this one needs to be looked at.

You can use the whitespace control markers to trim in the mean time. See the whitespace example at tryveil.com

@patriksvensson
Copy link
Author

Ah, I will try that. Thank you!

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