[lkml]   [2019]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH 0/2] RFC: Automatic :c:func: annotation in the sphinx build
There have been (justified) complaints that writing function() as
:c:func:`function()` in RST documents is obnoxious for both writers and
readers. The following patch adds an extension to the sphinx build to
add this annotation automatically instead. As is always the case,
recognizing "function()" is easy; recognizing the places where we should
*not* mangle things is harder.

Patch #2 removes all of the :c:func: annotations from xarray.rst - over
150 of them - to highlight the difference. The only change in the output
is cross references added for a couple of functions that were not annotated
in the original version.

This adds some processing during the docs build, but my attempts to
measure the slowdown showed that it is less than the noise between

The output from a full docs build with these patches applied can be
seen at

Jonathan Corbet (2):
Docs: An initial automarkup extension for sphinx
docs: remove :c:func: annotations from xarray.rst

Documentation/ | 3 +-
Documentation/core-api/xarray.rst | 270 ++++++++++++++---------------
Documentation/sphinx/ | 90 ++++++++++
3 files changed, 227 insertions(+), 136 deletions(-)
create mode 100644 Documentation/sphinx/


 \ /
  Last update: 2019-04-25 22:03    [W:0.153 / U:1.472 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site