Skip to content

Commit ecdb08e

Browse files
committed
FIX: Correctly handle multiple paragraphs in rcParams doc generation
1 parent 2fb04d1 commit ecdb08e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎doc/sphinxext/rcparams.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import textwrap
12
import typing
23

34
from docutils.parsers.rst import Directive
@@ -52,7 +53,8 @@ def run(self):
5253
f'.. _rcparam_{elem.name.replace(".", "_")}:',
5354
'',
5455
f'{elem.name} : {typestr} = ``{elem.default!r}``',
55-
f' {elem.description if elem.description else "*no description*"}'
56+
*textwrap.indent(
57+
elem.description or '*no description*', ' ').splitlines(),
5658
'',
5759
]
5860
self.state_machine.insert_input(lines, 'rcParams table')

0 commit comments

Comments
 (0)