kernel-doc/rst: do not output DOC: section titles for requested ones
authorJani Nikula <jani.nikula@intel.com>
Sun, 29 May 2016 19:27:35 +0000 (22:27 +0300)
committerJani Nikula <jani.nikula@intel.com>
Mon, 30 May 2016 10:38:55 +0000 (13:38 +0300)
If the user requests a specific DOC: section by name, do not output its
section title. In these cases, the surrounding context already has a
heading, and the DOC: section title is only used as an identifier and a
heading for clarity in the source file.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
scripts/kernel-doc

index dd08944..659d529 100755 (executable)
@@ -1764,7 +1764,9 @@ sub output_blockhead_rst(%) {
     my ($parameter, $section);
 
     foreach $section (@{$args{'sectionlist'}}) {
-       print "**$section**\n\n";
+       if ($output_selection != OUTPUT_INCLUDE) {
+           print "**$section**\n\n";
+       }
        output_highlight_rst($args{'sections'}{$section});
        print "\n";
     }