projects/linux·commit ecfb251a

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

ecfb251a · Randy Dunlap <[email protected]> · 2006-06-25 05:49:13 -07:00

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: Randy Dunlap <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
ecfb251a95dfca6ca0dba63414e9c91fcbb92335
Parents
cc44a817

Changes

1 files changed · +3 −0

FileStatusAddDelContent
scripts/kernel-docmodified+3−0View file

scripts/kernel-doc

View file
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 351def5..8bf1e54 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1674,6 +1674,9 @@ sub process_state3_type($$) {
# replace <, >, and &
sub xml_escape($) {
my $text = shift;
+ if (($output_mode eq "text") || ($output_mode eq "man")) {
+ return $text;
+ }
$text =~ s/\&/\\\\\\amp;/g;
$text =~ s/\</\\\\\\lt;/g;
$text =~ s/\>/\\\\\\gt;/g;