diff options
author | Marek Vasut <marex@denx.de> | 2012-10-06 14:05:00 +0000 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2012-10-15 11:54:15 -0700 |
commit | 95d45a91d723b89d6d1208019aeadcd4143cfc83 (patch) | |
tree | 32e34da93b83be649bd6b11d4e2d4713f4e0c15c | |
parent | 8d5d89e21dee6c4a4ec3613ea1550b9f5b74ac19 (diff) | |
download | u-boot-imx-95d45a91d723b89d6d1208019aeadcd4143cfc83.zip u-boot-imx-95d45a91d723b89d6d1208019aeadcd4143cfc83.tar.gz u-boot-imx-95d45a91d723b89d6d1208019aeadcd4143cfc83.tar.bz2 |
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-x | tools/kernel-doc/kernel-doc | 3 |
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"; } |