--- SyntaxHighlightingPlugin.pm.orig 2003-01-22 22:12:08.000000000 -0500 +++ SyntaxHighlightingPlugin.pm 2003-01-22 22:39:12.000000000 -0500 @@ -123,9 +123,9 @@ my $highlighted = pipeThru("enscript --color --language=html --highlight=$langs{lc($lang)} -o - -q", $text); if ($highlighted =~ s/.*\\n(.*?)\n?\<\/PRE\>.*/$1/os) { - if ($nb_option eq " numbered") + if ($nb_option =~ /numbered/i) { my $line = ($nb_start eq "") ? 1 : $nb_start; $highlighted =~ s/(^.*)/sprintf("%5d<\/font><\/b>\t%s", $line++, $1)/mgeo } @@ -163,9 +163,9 @@ { &TWiki::Func::writeDebug( "- SyntaxHighlightingPlugin::startRenderingHandler( $_[1] )" ) if $debug; # matches %begin [numbered][:n] language% ... %end% - $_[0] =~ s/^%begin( numbered)?(?:\:(\d+))? ([^%]*?)%\n(.*?)^%end%$/highlight($3, $4, $1, $2)/megos; + $_[0] =~ s/^%SYNTAX\{\s*\"([^"]*)\"\s*(numbered)?\s*(?:\:\s*(\d+))?\s*\}%\s*\n(.*?)^%SYNTAX:END%\s*$/highlight($1, $4, $2, $3)/megosi; } # =========================