Skip to content

Commit 32bc13c

Browse files
authored
Merge pull request #13 from albert-github/feature/bug_code
Doxygen supports `<code>`
2 parents 03163db + 05194cc commit 32bc13c

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

lib/Doxygen/Filter/Perl/POD.pm

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,25 @@ sub view_head4
117117
return "\n\@paragraph $sectionLabel$name$labelCnt $title\n" . $head4->content->present($self);
118118
}
119119

120-
sub view_seq_code
120+
121+
sub view_seq_code
121122
{
122123
my ($self, $text) = @_;
123-
return "\n\@code\n$text\n\@endcode\n";
124+
$text =~ s/"/\\"/g;
125+
return "<code>$text</code>";
124126
}
125127

126128

129+
sub view_verbatim {
130+
my ($self, $text) = @_;
131+
for ($text) {
132+
s/&/&amp;/g;
133+
s/</&lt;/g;
134+
s/>/&gt;/g;
135+
s/-/\\-/g;
136+
}
137+
return "<pre>$text</pre>\n\n";
138+
}
127139

128140

129141
=head1 NAME

0 commit comments

Comments
 (0)