From: Marek Vasut Date: Sat, 6 Oct 2012 14:05:00 +0000 (+0000) Subject: kerneldoc: Implement "Example" section handling X-Git-Tag: v2013.01-rc1~177 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=95d45a91d723b89d6d1208019aeadcd4143cfc83;p=kernel%2Fu-boot.git 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 --- 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"; }