aboutsummaryrefslogtreecommitdiff
path: root/scripts/gen_vimdoc.py
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2023-07-06 15:32:39 +0200
committerJustin M. Keyes <justinkz@gmail.com>2023-07-08 15:06:36 +0200
commit3a721820c39b7524a2e6d6a73774498104a38962 (patch)
tree4de2870a339aa8017cb662f79562ad767b02ea44 /scripts/gen_vimdoc.py
parent00d2f4b96eb9c8dcb6b9f67e256bb7faa19354db (diff)
downloadrneovim-3a721820c39b7524a2e6d6a73774498104a38962.tar.gz
rneovim-3a721820c39b7524a2e6d6a73774498104a38962.tar.bz2
rneovim-3a721820c39b7524a2e6d6a73774498104a38962.zip
docs: "Return (multiple)" heading
Problem: Lua functions that return multiple results are declared by using multiple `@return` docstring directives. But the generated docs don't make it obvious what this represents. Solution: - Generate a "Return (multiple)" heading for multiple-value functions. - Fix `@note` directives randomly placed after `@return`.
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 8410a3b5b1..eea56840ef 100755
--- a/scripts/gen_vimdoc.py
+++ b/scripts/gen_vimdoc.py
@@ -745,7 +745,7 @@ def fmt_node_as_vimhelp(parent, width=text_width - indentation, indent='',
chunks.append('\nParameters: ~')
chunks.append(fmt_param_doc(para['params']))
if len(para['return']) > 0:
- chunks.append('\nReturn: ~')
+ chunks.append('\nReturn (multiple): ~' if len(para['return']) > 1 else '\nReturn: ~')
for s in para['return']:
chunks.append(s)
if len(para['seealso']) > 0: