aboutsummaryrefslogtreecommitdiff
path: root/scripts/gen_vimdoc.py
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2022-10-05 08:15:55 -0400
committerGitHub <noreply@github.com>2022-10-05 05:15:55 -0700
commit18afacee1d98b9987391b8bdef08282fb156fa88 (patch)
treee997f4277de7a35dd5f75ed3aafeab54f6150dad /scripts/gen_vimdoc.py
parentf5727184808182deef6c5a2d7159bcf6df08e64c (diff)
downloadrneovim-18afacee1d98b9987391b8bdef08282fb156fa88.tar.gz
rneovim-18afacee1d98b9987391b8bdef08282fb156fa88.tar.bz2
rneovim-18afacee1d98b9987391b8bdef08282fb156fa88.zip
feat(docs): format parameters as a list #20485
Problem: The {foo} parameters listed in `:help api` and similar generated docs, are intended to be a "list" but they aren't prefixed with a list symbol. This prevents parsers from understanding the list, which forces generators like `gen_help_html.lua` to use hard-wrapped/preformatted layout instead of a soft-wrapped "flow" layout. Solution: Modify gen_vimdoc.py to prefix {foo} parameters with a "•" symbol.
Diffstat (limited to 'scripts/gen_vimdoc.py')
-rwxr-xr-xscripts/gen_vimdoc.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/gen_vimdoc.py b/scripts/gen_vimdoc.py
index 306857ca6c..2612260226 100755
--- a/scripts/gen_vimdoc.py
+++ b/scripts/gen_vimdoc.py
@@ -673,7 +673,7 @@ def fmt_node_as_vimhelp(parent, width=text_width - indentation, indent='',
max_name_len = max_name(m.keys()) + 4
out = ''
for name, desc in m.items():
- name = ' {}'.format('{{{}}}'.format(name).ljust(max_name_len))
+ name = ' • {}'.format('{{{}}}'.format(name).ljust(max_name_len))
out += '{}{}\n'.format(name, desc)
return out.rstrip()