[PATCH 1/6] kernel-doc: fix xml output mode

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>
Cc: <akpm@...>, Johannes Berg <johannes@...>, <sam@...>
Date: Wednesday, October 24, 2007 - 6:08 pm

From: Johannes Berg <johannes@sipsolutions.net>

After Randy's patch fixing the HTML output in DOC: sections
(6b5b55f6c404fa730a09a8254eb19f5a038afcc2) the same bug remained in XML
mode, this fixes it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>

---
 scripts/kernel-doc |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- linux-2.6.23-git19.orig/scripts/kernel-doc
+++ linux-2.6.23-git19/scripts/kernel-doc
@@ -182,10 +182,10 @@ my $blankline_html = $local_lt . "p" . $
 my %highlights_xml = ( "([^=])\\\"([^\\\"<]+)\\\"", "\$1<quote>\$2</quote>",
 			$type_constant, "<constant>\$1</constant>",
 			$type_func, "<function>\$1</function>",
-			$type_struct, "<structname>\$1</structname>",
+			$type_struct_xml, "<structname>\$1</structname>",
 			$type_env, "<envar>\$1</envar>",
 			$type_param, "<parameter>\$1</parameter>" );
-my $blankline_xml = "</para><para>\n";
+my $blankline_xml = $local_lt . "/para" . $local_gt . $local_lt . "para" . $local_gt . "\n";
 
 # gnome, docbook format
 my %highlights_gnome = ( $type_constant, "<replaceable class=\"option\">\$1</replaceable>",
@@ -394,7 +394,7 @@ sub output_highlight {
 #	confess "output_highlight got called with no args?\n";
 #   }
 
-    if ($output_mode eq "html") {
+    if ($output_mode eq "html" || $output_mode eq "xml") {
 	$contents = local_unescape($contents);
 	# convert data read & converted thru xml_escape() into &xyz; format:
 	$contents =~ s/\\\\\\/&/g;


-- 

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/6] kernel-doc: add DOC: sections support, Randy Dunlap, (Wed Oct 24, 6:08 pm)
Re: [PATCH 0/6] kernel-doc: add DOC: sections support, Sam Ravnborg, (Fri Oct 26, 4:18 pm)
Re: [PATCH 0/6] kernel-doc: add DOC: sections support, Matt Mackall, (Thu Oct 25, 1:29 pm)
Re: [PATCH 0/6] kernel-doc: add DOC: sections support, Randy Dunlap, (Thu Oct 25, 1:36 pm)
Re: [PATCH 0/6] kernel-doc: add DOC: sections support, Matt Mackall, (Thu Oct 25, 3:21 pm)
Re: [PATCH 0/6] kernel-doc: add DOC: sections support, Johannes Berg, (Fri Oct 26, 6:48 am)
Re: [PATCH 0/6] kernel-doc: add DOC: sections support, Matt Mackall, (Fri Oct 26, 10:46 am)
Re: [PATCH 0/6] kernel-doc: add DOC: sections support, Johannes Berg, (Fri Oct 26, 4:32 pm)
[PATCH 3/6] kernel-doc: single DOC: selection, Randy Dunlap, (Wed Oct 24, 6:08 pm)
[PATCH 2/6] kernel-doc: init kernel version, Randy Dunlap, (Wed Oct 24, 6:08 pm)
[PATCH 4/6] kernel-doc: process functions, not DOC:, Randy Dunlap, (Wed Oct 24, 6:08 pm)
[PATCH 5/6] kernel-doc: use no-doc option, Randy Dunlap, (Wed Oct 24, 6:08 pm)
[PATCH 1/6] kernel-doc: fix xml output mode, Randy Dunlap, (Wed Oct 24, 6:08 pm)