- eval_perl
-
Evaluate embedded Perl in a string, replacing blocks enclosed with <perl> tags with whatever they return (well, evaluated in a scalar context). Returns the modified string.
Also handles simple ${variables}, replacing them from the keys to $self.
- line_parse
-
Performs substitutions on lines called by fragment_slurp, at least. Calls include_process(), image_markup(), textile_process(), markdown_process(), eval_perl().
Applies before-parsing and after-parsing filters.
Returns string.
Parses some special markup. Specifically:
<perl>print "hello world";</perl> ${variable} interpolation from the WRT object <include>path/to/file/from/project/root</include> <textile></textile> - Text::Textile to HTML <markdown></markdown> - Text::Markdown::Discount to HTML <image>filename.ext optional alt tag optional title text</image> <freeverse></freeverse> <retcon></retcon> <list></list>
- newlines($replacement, $block)
-
Inline replace single newlines (i.e., line ends) within the block, except those preceded by a double-quote, which probably indicates a still-open tag.
- dashes($replacement, $block)
-
Inline replace double dashes in a block - " -- " - with a given replacement.
- include_process
-
Inline replace <include>filename</include> tags, replacing them with the contents of files.
- retrieve_include
-
Get the contents of an included file. This probably needs a great deal more thought than I am presently giving it.
- textile_process
-
Inline replace <textile> markup in a string.
- markdown_process
-
Inline replace <markdown> markup in a string.
- image_markup
-
Parse out an image tag and return the appropriate html.
Relies on image_size from App::WRT::Image.
1;