Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: sphinx/kernel_abi: properly split lines

Sphinx doesn't like to have lines split with str.split("\n").

Instead, it uses its own splitter, with handles line breaks the way
Spinx expects. Not using it cause issues at the output files.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/d4ad5b977799616544376210364d5cec686119ef.1739182025.git.mchehab+huawei@kernel.org

authored by

Mauro Carvalho Chehab and committed by
Jonathan Corbet
cc93e482 aea5e52d

+3 -2
+3 -2
Documentation/sphinx/kernel_abi.py
··· 36 36 import re 37 37 import sys 38 38 39 - from docutils import nodes 39 + from docutils import nodes, statemachine 40 40 from docutils.statemachine import ViewList 41 41 from docutils.parsers.rst import directives, Directive 42 42 from sphinx.util.docutils import switch_source_input ··· 105 105 old_f = fname 106 106 n = 0 107 107 for msg, f, ln in self.parser.doc(): 108 - msg_list = msg.split("\n") 108 + msg_list = statemachine.string2lines(msg, tab_width, 109 + convert_whitespace=True) 109 110 if "debug" in self.options: 110 111 lines = [ 111 112 "", "", ".. code-block:: rst",