forked from PebbleTemplates/pebble
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PebbleTemplates#422: Added inline verbatim description to Verbatim ta…
…g documentation
- Loading branch information
Showing
1 changed file
with
19 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,25 @@ | ||
# `verbatim` | ||
The `verbatim` tag allows you to write Pebble syntax that won't be parsed. | ||
The `verbatim` tag allows you to write a block of Pebble syntax that won't be parsed. | ||
```twig | ||
{% verbatim %} | ||
{% for user in users %} | ||
{{ user.name }} | ||
{% endfor %}} | ||
{% endfor %} | ||
{% endverbatim %} | ||
``` | ||
``` | ||
<br/> | ||
## Inline Verbatim Text | ||
|
||
For inline verbatim text, a string literal can be used. For example, if you need to include **{{** in the output of a template, you can use `{{ "{{" }}` in string literal in the Pebble template | ||
|
||
This would be useful if you are using Pebble to generate Angular HTML component template files: | ||
|
||
```javascript | ||
<td>{{ "{{" }}school.name{{ "}}" }}</td> | ||
``` | ||
|
||
would produce the following template output: | ||
|
||
```javascript | ||
<td>{{school.name}}</td> | ||
``` |