AngelDoReMi / closure-templates

Automatically exported from code.google.com/p/closure-templates
Apache License 2.0
0 stars 0 forks source link

Continuation lines that start with tags don't have space between them after rendering #15

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
If you have text that is broken over two lines, and the second line starts with 
a tag, after 
rendering there is no space after the last word of the first line.  For example:

The link is
<a href="somewhere">here</a>

Renders as "The link ishere" instead of "The link is here".

If the second line has a non-tag word, spacing is correct:

The link
is <a href="somewhere">here</a>

Tested on app engine and Linux.

Original issue reported on code.google.com by tball@google.com on 10 Apr 2010 at 9:16

GoogleCodeExporter commented 8 years ago
This is on purpose. This is how the parsing was designed. Please read the "Line
Joining" section of the documentation at
http://code.google.com/closure/templates/docs/concepts.html#linejoining

If you want to add a space at a line-joining location that is adjacent to a tag 
(HTML
or Soy tag), you need to use the command {sp}.  For example:

The link is
{sp}<a href="...">here</a>

-or-

The link is{sp}
<a href="...">here</a>

Original comment by kai.hu...@gmail.com on 12 Apr 2010 at 7:21