Only skip newlines if a tag is the only thing on the line.

Otherwise you get undesirable newline skipping if you do things like, for
example:

{{#foos}}
{{bar}}{{^-last}}, {{/-last}}
{{/foos}}

where you want the newline after {{/-last}}, but it was getting skipped.
This commit is contained in:
Michael Bayne
2011-08-29 14:44:17 -07:00
parent a3eb9e22e1
commit 4367ff6784
3 changed files with 30 additions and 17 deletions
+2 -2
View File
@@ -276,8 +276,8 @@ By taking advantage of reflection and bean-property-style lookups, you can do ko
Newline trimming
----------------
Newlines immediately following the opening or closing section tag are trimmed.
This allows for civilized templates, like:
If the opening or closing section tag are the only thing on a line, any newline
following the tag is trimmed. This allows for civilized templates, like:
Favorite foods:
{{#people}}