Subject: | Provide a means of post-processing the wiki output before returning it to the client |
Dialects should be able to define a postprocess_output() method that can be used for whitespace cleanup, helping a wiki engine parse certain markup (see e.g. bug 12395), etc. For example:
sub postprocess_output {
my( $pkg, $wc, $outref ) = @_;
$$outref =~ s/<br>\s*<br>/\n\n/g;
}
This would cause multiple line breaks to be replaced with a pair of
newlines (which is arguably a bad idea, but suffices as an example).
-- David Iberri