Skip to content

Commit

Permalink
Fixed error rendering C<...> blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
jonallen committed Sep 5, 2010
1 parent 6dc7049 commit 39c3838
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
17 changes: 14 additions & 3 deletions lib/Perldoc/Convert/html.pm
Expand Up @@ -221,14 +221,25 @@ sub view_verbatim {

sub view_seq_code {
my ($self,$text) = @_;

#$text =~ s/&gt;/>/sg;
#$text =~ s/&lt;/</sg;
#$text =~ s/&amp;/&/sg;
decode_entities($text);
#decode_entities($text);

my $linkpath = '../' x (0 + $document_name =~ s/::/::/g);
return Perldoc::Syntax::highlight('<code class="inline">','</code>',$text,$linkpath);

my $rendered;
if ($text =~ /<|>/) {
$rendered = '<code class="inline">' . $text .'</code>';
} else {
decode_entities($text);
$rendered = Perldoc::Syntax::highlight('<code class="inline">','</code>',$text,$linkpath);
}
#my $rendered = Perldoc::Syntax::highlight('<code class="inline">','</code>',$text,$linkpath);


return $rendered;
}


Expand Down
1 change: 0 additions & 1 deletion std.err
@@ -1 +0,0 @@
## Please see file SCALAR
Binary file modified syntax.cache
Binary file not shown.

0 comments on commit 39c3838

Please sign in to comment.