Closed josejachuf closed 6 years ago
@josejachuf that's strange. 1.2.4 should be better than 1.2.3 on html preservation.
Anyway, I can't reproduce this. I've just tried in bloggy to add something similar:
{{for post in posts:}}
<li>
<h2>{{=post.title}}</h2>
<a href="{{=url('one', post.id)}}">Read more</a> {{='foo'}}
<hr />
</li>
{{pass}}
and this is the page source rendered in browser:
<ul class="posts"><li>
<h2>foo2</h2>
<a href="/post/1">Read more</a> foo<hr />
</li></ul></div>
only the indentation is dropped.
@josejachuf anyway, if you can't find out what's going on, you can also change your app configuration
app.config.templates_prettify = True
And this should keep html in the original format. The rendering will be a bit slower in this way.
@gi0baro
Weppy 1.2.3
<a href="xxx" class="btn btn-success"><i class="fa fa-user"></i> 1</a>
Weppy 1.2.4
<a href="xxx" class="btn btn-success"<i class="fa fa-user"></i>1</a>
now I will try to change
app.config.templates_prettify = True
with w1.2.4 and
app.config.templates_prettify = True
works fine
@josejachuf hmm why is the second line missing a bracket?
@josejachuf ok, I figured out. There's a typo in one of the last commits. 1.2.5 is on its way!
@josejachuf this is fixed both in master and in v1.2.5 You should now be able to have well formatted html even without the prettify option.
Up to W1.2.3 in the template the spaces between the html code and the python code were respected. For example
but with W1.2.4, the space between </ i> and {{= ...}} disappears when rendered.