summaryrefslogtreecommitdiff
path: root/tools/kernel-doc
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2012-10-06 14:05:00 +0000
committerTom Rini <trini@ti.com>2012-10-15 11:54:15 -0700
commit95d45a91d723b89d6d1208019aeadcd4143cfc83 (patch)
tree32e34da93b83be649bd6b11d4e2d4713f4e0c15c /tools/kernel-doc
parent8d5d89e21dee6c4a4ec3613ea1550b9f5b74ac19 (diff)
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>
Diffstat (limited to 'tools/kernel-doc')
-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 8848efd8ed..6347418904 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";
}