scripts/kernel-doc: add internal hyperlink to DOC: sections
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Mon, 18 Jan 2021 11:08:13 +0000 (12:08 +0100)
committerJonathan Corbet <corbet@lwn.net>
Thu, 28 Jan 2021 23:35:00 +0000 (16:35 -0700)
While DOC: section titles are not converted into RST headings
sections and are only decorated with strong emphasis markup,
nothing stops us from generating internal hyperlinks for them,
to mimic implicit hyperlinks to RST headings.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://lore.kernel.org/r/20210118110813.1490-1-michal.wajdeczko@intel.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
scripts/kernel-doc

index a9a92e623dbc48a8b567a2d28466a61c585893b5..e046e16e4411bdca1fe0f3c435e5ec59f137ceea 100755 (executable)
@@ -836,6 +836,7 @@ sub output_blockhead_rst(%) {
        next if (defined($nosymbol_table{$section}));
 
        if ($output_selection != OUTPUT_INCLUDE) {
+           print ".. _$section:\n\n";
            print "**$section**\n\n";
        }
         print_lineno($section_start_lines{$section});