提交 ecfb251a 编写于 作者: R Randy Dunlap 提交者: Linus Torvalds

[PATCH] kernel-doc: don't use XML escapes in text or man output mode

For kernel-doc output modes of text and man, do not use XML escapes for
less-than, greater-than, and ampersand characters.  I.e., leave the text
and man output clean and readable.
Signed-off-by: NRandy Dunlap <rdunlap@xenotime.net>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 cc44a817
...@@ -1674,6 +1674,9 @@ sub process_state3_type($$) { ...@@ -1674,6 +1674,9 @@ sub process_state3_type($$) {
# replace <, >, and & # replace <, >, and &
sub xml_escape($) { sub xml_escape($) {
my $text = shift; my $text = shift;
if (($output_mode eq "text") || ($output_mode eq "man")) {
return $text;
}
$text =~ s/\&/\\\\\\amp;/g; $text =~ s/\&/\\\\\\amp;/g;
$text =~ s/\</\\\\\\lt;/g; $text =~ s/\</\\\\\\lt;/g;
$text =~ s/\>/\\\\\\gt;/g; $text =~ s/\>/\\\\\\gt;/g;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册