Skip to content

Commit 39c3838

Browse files
committed
Fixed error rendering C<...> blocks
1 parent 6dc7049 commit 39c3838

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

lib/Perldoc/Convert/html.pm

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,14 +221,25 @@ sub view_verbatim {
221221

222222
sub view_seq_code {
223223
my ($self,$text) = @_;
224-
224+
225225
#$text =~ s/&gt;/>/sg;
226226
#$text =~ s/&lt;/</sg;
227227
#$text =~ s/&amp;/&/sg;
228-
decode_entities($text);
228+
#decode_entities($text);
229229

230230
my $linkpath = '../' x (0 + $document_name =~ s/::/::/g);
231-
return Perldoc::Syntax::highlight('<code class="inline">','</code>',$text,$linkpath);
231+
232+
my $rendered;
233+
if ($text =~ /<|>/) {
234+
$rendered = '<code class="inline">' . $text .'</code>';
235+
} else {
236+
decode_entities($text);
237+
$rendered = Perldoc::Syntax::highlight('<code class="inline">','</code>',$text,$linkpath);
238+
}
239+
#my $rendered = Perldoc::Syntax::highlight('<code class="inline">','</code>',$text,$linkpath);
240+
241+
242+
return $rendered;
232243
}
233244

234245

std.err

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
## Please see file SCALAR

syntax.cache

68.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)