[PATCH] kernel-doc: don't use XML escapes in text or man output mode
authorRandy Dunlap <rdunlap@xenotime.net>
Sun, 25 Jun 2006 12:49:13 +0000 (05:49 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 25 Jun 2006 17:01:23 +0000 (10:01 -0700)
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 <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
scripts/kernel-doc

index 351def5..8bf1e54 100755 (executable)
@@ -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;