Skip to content

Commit 2dfc11c

Browse files
KnownNexusstephenfin
authored andcommitted
Updated implementation of philipstarkey's fix
Following from [1] seemingly stagnating, I have reimplemented philipstarkey's fix for "Documentation ignores the \b characters in docstrings" in hopes of getting the ball rolling again [1] #8
1 parent 7b7888c commit 2dfc11c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

sphinx_click/ext.py

+7
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,15 @@ def _format_description(ctx):
7070
if not help_string:
7171
return
7272

73+
bar_enabled = False
7374
for line in statemachine.string2lines(
7475
help_string, tab_width=4, convert_whitespace=True):
76+
if line == '\b':
77+
bar_enabled = True
78+
continue
79+
if line == '':
80+
bar_enabled = False
81+
line = '| ' + line if bar_enabled else line
7582
yield line
7683
yield ''
7784

0 commit comments

Comments
 (0)