Permalink
Browse files

Fixed error rendering C<...> blocks

  • Loading branch information...
1 parent 6dc7049 commit 39c383869faa7c5f13540592551dd376c7d11629 @jonallen committed Sep 5, 2010
Showing with 14 additions and 4 deletions.
  1. +14 −3 lib/Perldoc/Convert/html.pm
  2. +0 −1 std.err
  3. BIN syntax.cache
View
17 lib/Perldoc/Convert/html.pm
@@ -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;
}
View
1 std.err
@@ -1 +0,0 @@
-## Please see file SCALAR
View
BIN syntax.cache
Binary file not shown.

0 comments on commit 39c3838

Please sign in to comment.