mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00:00
[Backport release-0.8] feat(docs): format parameter list as a list (#20588)
feat(docs): format parameter list as a list
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.
(cherry picked from commit 24e5b5c8c7
)
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
This commit is contained in:
![41898282+github-actions[bot]@users.noreply.github.com](/assets/img/avatar_default.png)
committed by
GitHub

parent
47cd3cf852
commit
00761ad1e6
@@ -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()
|
||||
|
||||
|
Reference in New Issue
Block a user