[U-Boot] [PATCH 3/4] doc: kerneldoc: Implement "Example" section handling
Marek Vasut
marex at denx.de
Sat Sep 29 03:33:13 CEST 2012
The default kernel-doc strips starting spaces from every single
line in the Example section. This makes the code look bad. Thus,
implement special handling for this section.
Signed-off-by: Marek Vasut <marex at denx.de>
---
tools/kernel-doc/kernel-doc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/kernel-doc/kernel-doc b/tools/kernel-doc/kernel-doc
index 8848efd..6347418 100755
--- a/tools/kernel-doc/kernel-doc
+++ b/tools/kernel-doc/kernel-doc
@@ -2424,6 +2424,9 @@ sub process_file($) {
# Continued declaration purpose
chomp($declaration_purpose);
$declaration_purpose .= " " . xml_escape($1);
+ } elsif ($section =~ m/^Example/) {
+ $_ =~ s/^\s*\*//;
+ $contents .= $_;
} else {
$contents .= $1 . "\n";
}
--
1.7.10.4
More information about the U-Boot
mailing list