Closed amimas closed 2 years ago
Not a bug, just an unfortunate consequence of using a templating language. All examples in the README are prettified for legibility, but most templating languages, including handlebars, will output less than ideal formatting. If this is undesirable, you'll need to pass the output through another tool that can reformat it for you.
Thanks for the quick reply. The above mentioned whitespace issue only seems to happen when using {{content}}
. So maybe there's a room for enhancing this so that additional reformatting tool is not needed. Or maybe it's not as simple as I imagine. I am relatively new to templating language.
As a workaround, I updated my content to add an extra blank line after {{content}}
. That seems to be good enough for now. For example use the following in index.hbs
instead of the one I posted above:
{{#extend "layout"}}
{{#content "main"}}
<div class="container">
<div id="menu"></div>
<div id="content">
<p>Hello world!!</p>
</div>
</div>
{{/content}}
{{/extend}}
Not sure if this is a bug. This is the first time I'm trying this for logical structure and layout of handlebar templates. Here is what I have so far:
layout.hbs
:document-head.hbs
(partial):header.hbs
(partial):footer.hbs
(partial):index.hbs
:Here is the output of
index.html
generated fromindex.hbs
. Notice the extra whitespace in front of<div class="container">
.