diff options
author | Arne Georg Gleditsch <argggh@lxr.linpro.no> | 2007-11-22 12:32:35 +0100 |
---|---|---|
committer | Arne Georg Gleditsch <argggh@lxr.linpro.no> | 2007-11-22 12:32:35 +0100 |
commit | 0a7345dfa8a6d061e13394fdbe31c77231f1847c (patch) | |
tree | 1cb7d9ee680268aea821fc8ca4a1c318b3289f9c /lib/LXRng/Markup/File.pm | |
parent | 8c978d76179b4f573c1eb9b9bb9db966c81330bb (diff) |
IE fixes, HTML fixes, ++
Diffstat (limited to 'lib/LXRng/Markup/File.pm')
-rw-r--r-- | lib/LXRng/Markup/File.pm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/LXRng/Markup/File.pm b/lib/LXRng/Markup/File.pm index abb763c..3983a3c 100644 --- a/lib/LXRng/Markup/File.pm +++ b/lib/LXRng/Markup/File.pm @@ -30,11 +30,9 @@ sub make_format_newline { $line++; $nl = safe_html($nl); - # id="<num>" is not valid XHTML 1.0, but it is an extremely - # handy shorthand for generating line numbers that don't - # affect cut-n-paste. - return qq{$nl<a id="L$line" name="L$line"></a>}. - qq{<a href="$name#L$line" id="$line" class="line"></a>}; + return qq{</span>$nl<li>}. + qq{<a href="$name#L$line" class="line"><span></span></a>}. + qq{<a id="L$line" name="L$line"></a><span class="line">}; } } @@ -98,7 +96,10 @@ sub format_code { sub format_raw { my ($self, $str) = @_; - return safe_html($str); + $str = safe_html($str); + $str =~ s((http://[^/\"]+(/[^\s\"]*|)[^.\,\)\>\"])) + (<a href="$1">$1</a>)g; + return $str; } sub markupfile { |