Syntax::Highlight::HTML is a Perl module to highlight a HTML syntax.
SYNOPSIS
use Syntax::Highlight::HTML;
my $highlighter = new Syntax::Highlight::HTML;
$output = $highlighter->parse($html);
If $html contains the following HTML fragment:
< !-- a description list -->
< dl compact="compact">
< dt>some word< /dt>
< dd>the description of the word. Plus some < a href="/definitions/other_word"
>reference< /a> towards another definition. < /dd>
< /dl>
then the resulting HTML contained in $output will render like this:
< !-- a description list -->
< dl compact="compact">
< dt>some word< /dt>
< dd>the description of the word. Plus some < a href="/definitions/other_word"
>reference< /a> towards another definition. < /dd>
< /dl>
This module is designed to take raw HTML input and highlight it (using a CSS stylesheet, see "Notes" for the classes). The returned HTML code is ready for inclusion in a web page.
It is intented to be used as an highlighting filter, and as such does not reformat or reindent the original HTML code.
Product's homepage
Requirements:
· Perl