aboutsummaryrefslogtreecommitdiff
path: root/scripts/gen_vimdoc.py
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-12-19 17:10:34 -0800
committerJustin M. Keyes <justinkz@gmail.com>2019-12-21 20:36:00 -0800
commit62e365f5776cfe8e460fdd29a1d7fa89a5c9c0bc (patch)
tree49f73907183bc10016a6ca52fab8fa6b338f32a2 /scripts/gen_vimdoc.py
parent481da1ce4060fd3045ac6553cef69f4fa4f9829d (diff)
downloadrneovim-62e365f5776cfe8e460fdd29a1d7fa89a5c9c0bc.tar.gz
rneovim-62e365f5776cfe8e460fdd29a1d7fa89a5c9c0bc.tar.bz2
rneovim-62e365f5776cfe8e460fdd29a1d7fa89a5c9c0bc.zip
gen_vimdoc.py: mpack: exclude deprecated functions
The `mpack` variable was a tuple, which manifests as an array in the generated msgpack structure. - Removes noise from the mpack data (deprecated functions are deprecated). - Eliminates 1 level of nesting. BEFORE: [ { "buffer.c": [ { "nvim__buf_stats": { ... }, ... }, { "buffer_del_line": { ... }, ... }, ], ... } ] AFTER: [ { "buffer.c": { "nvim__buf_stats": { ... }, ... }, ... ]
Diffstat (limited to 'scripts/gen_vimdoc.py')
-rwxr-xr-xscripts/gen_vimdoc.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/gen_vimdoc.py b/scripts/gen_vimdoc.py
index 368eaf48f1..2ca121c299 100755
--- a/scripts/gen_vimdoc.py
+++ b/scripts/gen_vimdoc.py
@@ -727,7 +727,7 @@ def gen_docs(config):
if p.returncode:
sys.exit(p.returncode)
- doc_maps = {}
+ fn_maps = {}
sections = {}
intros = {}
sep = '=' * text_width
@@ -756,7 +756,7 @@ def gen_docs(config):
filename = get_text(find_first(compound, 'name'))
if filename.endswith('.c') or filename.endswith('.lua'):
- mpack = extract_from_xml(os.path.join(base, '{}.xml'.format(
+ fn_map, _ = extract_from_xml(os.path.join(base, '{}.xml'.format(
compound.getAttribute('refid'))), mode, False)
functions_text, deprecated_text, fns = fmt_doxygen_xml_as_vimhelp(
@@ -798,7 +798,7 @@ def gen_docs(config):
title = '{} Functions'.format(name)
helptag = '*api-{}*'.format(name.lower())
sections[filename] = (title, helptag, doc)
- doc_maps[filename] = mpack
+ fn_maps[filename] = fn_map
if not sections:
return
@@ -831,7 +831,7 @@ def gen_docs(config):
fp.write(docs.encode('utf8'))
with open(mpack_file, 'wb') as fp:
- fp.write(msgpack.packb(doc_maps, use_bin_type=True))
+ fp.write(msgpack.packb(fn_maps, use_bin_type=True))
shutil.rmtree(output_dir)