Skip to contentSkip to conversation

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

PATCH New Randy.Dunlap 1 participant 1 message Jun 19, 2006

lore
Share & tools
lore
#0 lore raw

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

From: Randy Dunlap <[email protected]>

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.

---
 scripts/kernel-doc |    3 +++
 1 files changed, 3 insertions(+)
scripts/kernel-doc +3 -0
@@ -1673,6 +1673,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;

---