diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/gen_api_vimdoc.py | 21 | ||||
-rwxr-xr-x | scripts/vim-patch.sh | 2 |
2 files changed, 22 insertions, 1 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 diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index 22f946ebd9..59674eb63a 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -244,7 +244,7 @@ stage_patch() { else printf "\nApplying patch...\n" patch -p1 < "${patch_file}" || true - find -name '*.orig' -type f -delete + find . -name '*.orig' -type f -delete fi printf "\nInstructions:\n Proceed to port the patch.\n" else |