diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2018-08-02 13:28:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-02 13:28:36 +0200 |
commit | 2b9fc9a13f1404260448c129762a2679ac688372 (patch) | |
tree | d252343457668ef7b5998f831669baf842f60cde /scripts/gen_api_vimdoc.py | |
parent | a2253744c9bcd9229be9533540075e977f0be2cd (diff) | |
parent | ea2e8f4f107fb50cbb261d4377922ce3814cce32 (diff) | |
download | rneovim-2b9fc9a13f1404260448c129762a2679ac688372.tar.gz rneovim-2b9fc9a13f1404260448c129762a2679ac688372.tar.bz2 rneovim-2b9fc9a13f1404260448c129762a2679ac688372.zip |
Merge pull request #8660 from phodge/7688-nvim-buf-lines-should-return-empty-list-for-unloaded-buffer
handle unloaded buffers in nvim_buf_*() functions
Diffstat (limited to 'scripts/gen_api_vimdoc.py')
-rwxr-xr-x | scripts/gen_api_vimdoc.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/gen_api_vimdoc.py b/scripts/gen_api_vimdoc.py index 0bbc3706c6..4e86f15b37 100755 --- a/scripts/gen_api_vimdoc.py +++ b/scripts/gen_api_vimdoc.py @@ -413,10 +413,26 @@ def gen_docs(config): sys.exit(p.returncode) sections = {} + intros = {} sep = '=' * text_width base = os.path.join(out_dir, 'xml') dom = minidom.parse(os.path.join(base, 'index.xml')) + + # generate docs for section intros + for compound in dom.getElementsByTagName('compound'): + if compound.getAttribute('kind') != 'group': + continue + + groupname = get_text(find_first(compound, 'name')) + groupxml = os.path.join(base, '%s.xml' % compound.getAttribute('refid')) + + desc = find_first(minidom.parse(groupxml), 'detaileddescription') + if desc: + doc = parse_parblock(desc) + if doc: + intros[groupname] = doc + for compound in dom.getElementsByTagName('compound'): if compound.getAttribute('kind') != 'file': continue @@ -437,6 +453,11 @@ def gen_docs(config): name = name.title() doc = '' + + intro = intros.get('api-%s' % name.lower()) + if intro: + doc += '\n\n' + intro + if functions: doc += '\n\n' + functions |