Convertor class for translating TML (Topic Meta Language) into
HTML
The convertor does not use the Foswiki rendering, as that is a
lossy conversion, and would make symmetric translation back to TML
an impossibility.
The design goal was to support round-trip conversion from well-formed
TML to XHTML1.0 and back to identical TML. Notes that some deprecated
TML syntax is not supported.
ClassMethod new()
Construct a new TML to HTML convertor.
ObjectMethod convert( $tml, \%options ) → $tml
Convert a block of TML text into HTML.
Options:
getViewUrl is a reference to a method: getViewUrl($web,$topic) -> $url (where $topic may include an anchor)
expandVarsInURL is a reference to a static method: expandVarsInURL($url, \%options) -> $url that expands selected variables in URLs so that, for example, tags appear as pictures in the wysiwyg editor.
xmltag is a reference to a hash. The keys are names of XML-like tags. The values are references to a function to determine if the content of the tag must be protected: fn($markup) -> $bool The $markup appears between the delimiters. The functions may modify the markup.
dieOnError makes convert throw an exception if a conversion fails. The default behaviour is to encode the whole topic as verbatim text.