Merge pull request #132 from maximebochon/patch-3

README: use HTML code blocks for HTML examples
This commit is contained in:
Michael Bayne
2022-05-14 11:57:45 -07:00
committed by GitHub
+6
View File
@@ -409,23 +409,28 @@ Newline trimming
If the opening or closing section tag are the only thing on a line, any surrounding whitespace and
the line terminator following the tag are trimmed. This allows for civilized templates, like:
```html
Favorite foods:
<ul>
{{#people}}
<li>{{first_name}} {{last_name}} likes {{favorite_food}}.</li>
{{/people}}
</ul>
```
which produces output like:
```html
Favorite foods:
<ul>
<li>Elvis Presley likes peanut butter.</li>
<li>Mahatma Gandhi likes aloo dum.</li>
</ul>
```
rather than:
```html
Favorite foods:
<ul>
@@ -434,6 +439,7 @@ rather than:
<li>Mahatma Gandhi likes aloo dum.</li>
</ul>
```
which would be produced without the newline trimming.