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;
Topic revision: r1 - 19 Apr 2011, ProjectContributor
 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding FAIR Wiki? Send feedback