Text Templates
The TextTemplateParser
parses the input stream as a sequence of text
lines with embedded placeholders. Placeholders may not span several
lines, i.e. they must completely be on one line.
Table of Contents
Placeholders
The rules for placeholders are quite simple! A placeholder starts with
a single special character and ends with – perhaps a different –
special character. Anything between the starting and ending special
character is consider to be the name of the placeholder. If e.g. <
is the start character and >
the end character then the name of the
placeholder <ph>
would be ‘ph’. To use the start character as part
of the static template content it has to be repeated. Therefore no
placeholder would be recognized in this <<is no> placeholder
. Instead this would result in the static content this <is no> placeholder
.
End of Lines
Handling end of lines is not so much question of template file but of
the text template parser (see EndLine
). The standard behavior of
the text template parser is to add the platform specific line end to
all but the last line. This behavior can easily be customized by
implementing EndLIne
.
Date: May 25, 2014
HTML generated with emacs org-mode & Toxic by [qb]