History

[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.

Randy Dunlap committed 20 years ago

Commit ecfb2511 parent cc44a811 file · +3 −0Browse files

Unified · Split

scripts/kernel-doc+3−0
@@ -1674,6 +1674,9 @@ sub process_state3_type($$) { · 1673 unmodified lines
1674# replace <, >, and &1674# replace <, >, and &
1675sub xml_escape($) {1675sub xml_escape($) {
1676 my $text = shift;1676 my $text = shift;
1677 if (($output_mode eq "text") || ($output_mode eq "man")) {
1678 return $text;
1679 }
1677 $text =~ s/\&/\\\\\\amp;/g;1680 $text =~ s/\&/\\\\\\amp;/g;
1678 $text =~ s/\</\\\\\\lt;/g;1681 $text =~ s/\</\\\\\\lt;/g;
1679 $text =~ s/\>/\\\\\\gt;/g;1682 $text =~ s/\>/\\\\\\gt;/g;