summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2012-10-06 14:05:00 (GMT)
committerTom Rini <trini@ti.com>2012-10-15 18:54:15 (GMT)
commit95d45a91d723b89d6d1208019aeadcd4143cfc83 (patch)
tree32e34da93b83be649bd6b11d4e2d4713f4e0c15c
parent8d5d89e21dee6c4a4ec3613ea1550b9f5b74ac19 (diff)
downloadu-boot-fsl-qoriq-95d45a91d723b89d6d1208019aeadcd4143cfc83.tar.xz
kerneldoc: Implement "Example" section handling
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@denx.de>
-rwxr-xr-xtools/kernel-doc/kernel-doc3
1 files changed, 3 insertions, 0 deletions
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";
}