ReST requires a blank line to start a list. This is a bit annoying for the internal documentation because this makes, IMO, things less readable in the code. Tweak the documentation extraction tool to automatically insert these blank lines (between a line ending with ':' and the next one if not empty). Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- Documentation/sphinx/cdoc.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/sphinx/cdoc.py b/Documentation/sphinx/cdoc.py index dfb28a5bb..318e9b236 100755 --- a/Documentation/sphinx/cdoc.py +++ b/Documentation/sphinx/cdoc.py @@ -217,6 +217,9 @@ def convert_to_rst(info): for i in range(1, len(desc)): l = desc[i] lst.append((n+i, l)) + # auto add a blank line for a list + if re.search(r":$", desc[i]) and re.search(r"\S", desc[i+1]): + lst.append((n+i, '')) elif typ == 'func': (n, l) = info['func'] -- 2.18.0