aboutsummaryrefslogtreecommitdiff
path: root/scripts/gen_vimdoc.py
diff options
context:
space:
mode:
authorGregory Anders <8965202+gpanders@users.noreply.github.com>2021-10-19 13:55:22 -0600
committerGitHub <noreply@github.com>2021-10-19 12:55:22 -0700
commitdfef90a518005a6ace8b363fe1df89dd8ec3c4ce (patch)
tree77549ad0d64ccae0411338751e29f27a7937abf0 /scripts/gen_vimdoc.py
parent064411ea7ff825aed3d4e01207914ed61d7ee79d (diff)
downloadrneovim-dfef90a518005a6ace8b363fe1df89dd8ec3c4ce.tar.gz
rneovim-dfef90a518005a6ace8b363fe1df89dd8ec3c4ce.tar.bz2
rneovim-dfef90a518005a6ace8b363fe1df89dd8ec3c4ce.zip
fix(gen_vimdoc.py): spacing around inline elements #16092
The spacing fix drew attention to a couple of places that were using incorrect formatting such as the key listing for `nvim_open_win`, so those were fixed too.
Diffstat (limited to 'scripts/gen_vimdoc.py')
-rwxr-xr-xscripts/gen_vimdoc.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/gen_vimdoc.py b/scripts/gen_vimdoc.py
index f37e4c9d37..7f4dccfd3c 100755
--- a/scripts/gen_vimdoc.py
+++ b/scripts/gen_vimdoc.py
@@ -506,6 +506,11 @@ def render_node(n, text, prefix='', indent='', width=62):
text += indent + prefix + result
elif n.nodeName in ('para', 'heading'):
for c in n.childNodes:
+ if (is_inline(c)
+ and '' != get_text(c).strip()
+ and text
+ and ' ' != text[-1]):
+ text += ' '
text += render_node(c, text, indent=indent, width=width)
elif n.nodeName == 'itemizedlist':
for c in n.childNodes: