Skip to content

Commit

Permalink
Updated documentation on SimpleTemplate and embedded blocks. (#1028)
Browse files Browse the repository at this point in the history
* Updated documentation on SimpleTemplate and embedded blocks.
* Addressed review comments.
  • Loading branch information
vsajip authored and defnull committed Dec 1, 2019
1 parent b23f2e8 commit a194622
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/stpl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,21 @@ Both the ``%`` and the ``<%`` tokens are only recognized if they are the first n

If you find yourself needing to escape a lot, consider using :ref:`custom tokens <stpl-custom-tokens>`.

Note that ``%`` and ``<% %>`` work in *exactly* the same way. The latter is only a convenient way to type less and avoid clutter for longer code segments. This means that in ``<% %>`` blocks, all indented code must be terminated with an ``end``, as in the following example::

<%
if some_condition:
some_operation()
elif some_other_condition:
some_other_operation()
else:
yet_another_operation()
if yet_another_condition:
some_more_stuff()
end
end
%>

Whitespace Control
-----------------------

Expand Down

0 comments on commit a194622

Please sign in to comment.