Heredoc
A heredoc section is treated as an unparsed part of the page and
can contain arbitrary molly tags. These tags are treated as plain text and loose
any special server side meaing. The heredoc section ends when the
heredoc ending delimiter is encountered. The ending delimiter can be anywhere,
the textual position of the ending delimiter is unimportant and does not have to
start on a new line.
Heredocs are very useful when your HTML/text contains a lot of square
brackets and other code that can confuse the molly page parser. Since
parsing is turned off completely in the heredoc section, this is a
great escape valve for arbitrary text (as long as it does not
contain the ending delimiter).
Syntax
Heredoc sections can appear anywhere (and as many times as needed) in
text sections.
[page <<<DELIMITER]
.. anything ..
DELIMITER
The DELIMITER is any arbitrary text.
Tag-Escape
To prevent the tag from being recognized, this tag can be escaped by
prefixing the start tag with a backslash: \[page
Example
A molly page containing a heredoc section. The contents of the
heredoc are treated as plain old HTML and loose any special
server-side page meaning.
[page <<
[[ String x = "Hello World"; ]]
[= 2+2 ]
I can put anything (except the closing
heredoc tag) here and it will be sent
as-is to the browser.