internal package
Foswiki::Configure::TemplateParser
parser ($parserId) -> $parser
Static parser factory. Param $parserId must point to existing
TemplateParser subclass!
Sets the skin of the parser
parse( $templateText, \%keyValues )
To be implemented by subclasses.
_cleanupTemplateResidues( $templateText )
To be implemented by subclasses.
readTemplate( $name ) => $text
Reads the contents of template file with name $name, where the name is either:
- 'page'
- 'main'
- 'section'
Example:
my $text = Foswiki::readTemplate('section');
commenting out, this seems just 'to work'
$text =~ s#/\*.*?\*/##g;
$text =~ s#\s*//.*$##gm if ( $resource =~ /\.js$/ ); #
$text =~ s/\t/ /g;
$text =~ s/[ ]+$//gm;
$text =~ s/^\s+//gm;
$text =~ s/ +/ /g;
$text =~ s/\s*\n/\n/gs;