我看到这个问题在这里有人通过注释标签或像这样打断标签来解决它:
我记得好像看过一些技巧,就像这样。
有没有更简便的方法做这个?
<i><!--
-->t does not work on the first level with tabspace = 2
beside it looks horrible.
<a
>nnoying<
/a> is it not?
我记得好像看过一些技巧,就像这样。
<a>&dont_put_here_space_please;
tricky ampersand code.
有这样的东西吗?
我现在使用的是 jinja2 python 模板引擎。它有一些避免空格的技巧吗?
更新:
使用 jinja2,感谢 dav1d,我能想到的最简短的方法是:
<a>{% if true -%}
No space in the output before this text.
</a>{% endif -%}
Nor after.
有没有更简便的方法做这个?