HTML::WikiConverter::Normalizer 0.61 review
DownloadSYNOPSIS use HTML::TreeBuilder; use HTML::WikiConverter::Normalizer; my $tree = new HTML::TreeBuilder(); $tree->parse
|
|
SYNOPSIS
use HTML::TreeBuilder;
use HTML::WikiConverter::Normalizer;
my $tree = new HTML::TreeBuilder();
$tree->parse( 'text' );
my $norm = new HTML::WikiConverter::Normalizer();
$norm->normalize($tree);
# Roughly gives "text"
print $tree->as_HTML();
HTML::WikiConverter dialects convert HTML into wiki markup. Most (if not all) know nothing about CSS, nor do they take it into consideration when performing html-to-wiki conversion. But there is no good reason for, say, text not to be converted into '''text''' in the MediaWiki dialect. The same is true of other dialects, all of which should be able to use CSS information to produce wiki markup.
The issue becomes especially problematic when considering that several WYSIWYG HTML editors (e.g. Mozilla's) produce this sort of CSS-heavy HTML. Prior to HTML::WikiConverter::Normalizer, this HTML would have been essentially converted to text, the CSS information having been ignored by HTML::WikiConverter.
HTML::WikiConverter::Normalizer avoids this with a few simple transformations that convert CSS styles into HTML tags.
Requirements:
Perl
HTML::WikiConverter::Normalizer 0.61 search tags