[Cppcms-users] templates: newline on every include
Brought to you by:
artyom-beilis
|
From: kpeo <sla...@ya...> - 2012-02-21 08:29:21
|
Hello!
It's not a bug actually, just remark for possible future cosmetic changes.
I found that every time you include template inside of template, like:
<% template call3() %>
<%= text %>
<% end template %>
<% template call2() %>
<% include call3() %>
<% end template %>
<% template call1() %>
<% include call2() %>
<% end template %>
<% template render() %>
<html><body><h1>
<% include call1() %>
</h1></body></html>
<% end template %>
cppcms_tmpl_cc wrapping it with empty newline (comments skipped):
virtual void call2() {
out()<<"\n"
" ";
call3();
out()<<"\n"
"";
}
this results in newline on every "subtemplate" in output html-file:
1. <html><body><h1>
2.
3.
4.
5. Hello!
6.
7.
8.
9. </h1></body></html>
So output html don't looks so readable and formatted.
Easy workaround for now - edit generated source file after cppcms_tmpl_cc.
|