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

Remove Whitespace and Newline when using blocks #51

Closed
danielmarbach opened this issue Apr 28, 2015 · 5 comments
Closed

Remove Whitespace and Newline when using blocks #51

danielmarbach opened this issue Apr 28, 2015 · 5 comments

Comments

@danielmarbach
Copy link
Contributor

This might be something not worth diving into but I noticed that when I do something like:

{{ #if hasMethodsRemoved }}
<h4>Methods Removed</h4>
<ul>
  {{ #methodsRemoved }}
  <li><code>{{ name }}</code></li>
  {{ /methodsRemoved }}
</ul>
{{ /if }}

The result is

<h4>Methods Removed</h4>
<ul>

  <li><code>Foo()</code></li>
  <li><code>Foo()</code></li>

</ul>

Would you be interested in a PR to remove that whitespace? If yes any pointers where to start?

@rexm
Copy link
Member

rexm commented Apr 28, 2015

How does the handlebarsjs library output this test case?

@danielmarbach
Copy link
Contributor Author

To be frank I haven't even looked

Am 28.04.2015 um 17:22 schrieb Rex Morgan notifications@github.com:

How does the handlebarsjs library output this test case?


Reply to this email directly or view it on GitHub.

@danielmarbach
Copy link
Contributor Author

I checked. Original handle bars also leaves whitespace. See each template on http://tryhandlebarsjs.com/

@rexm
Copy link
Member

rexm commented Apr 30, 2015

Thanks for following up!

@rexm rexm closed this as completed Apr 30, 2015
@rexm
Copy link
Member

rexm commented Apr 30, 2015

I opened a new enhancement issue (#52) that touches on this. The JS library does allow for removing whitespace around a statement, that is not currently supported in this library.

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