Skip to content

Commit

Permalink
scripts/kernel-doc: add internal hyperlink to DOC: sections
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michal Wajdeczko authored and Jonathan Corbet committed Jan 28, 2021
1 parent c66cb17 commit 06a755d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scripts/kernel-doc
Original file line number Diff line number Diff line change
Expand Up @@ -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});
Expand Down

0 comments on commit 06a755d

Please sign in to comment.