Fix formatting of tweak docs

New para lines should not be appended to the preceding blank line with a
space
This commit is contained in:
Kovid Goyal 2021-07-07 21:36:21 +05:30
parent d938936ab6
commit c2c85534ea
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -46,7 +46,10 @@ def format_doc(doc):
default_indent = indent
current_indent = indent
if indent == default_indent:
lines[-1] += ' ' + line
if lines and lines[-1]:
lines[-1] += ' ' + line
else:
lines.append(line)
else:
lines.append(' ' + line.strip())
return '\n'.join(lines).lstrip()