chore(gen_vimdoc): fall back to brief_desc_node when desc_node is empty

This commit is contained in:
Daiki Mizukami 2022-03-13 21:36:46 +09:00
parent 334a16c791
commit be2def4100
No known key found for this signature in database
GPG Key ID: 10478E598B944AA2
2 changed files with 7 additions and 2 deletions

View File

@ -594,7 +594,8 @@ nvim__id_float({flt}) *nvim__id_float()*
its argument.
nvim__inspect_cell({grid}, {row}, {col}) *nvim__inspect_cell()*
TODO: Documentation
NB: if your UI doesn't use hlstate, this will not return
hlstate first time.
nvim__runtime_inspect() *nvim__runtime_inspect()*
TODO: Documentation

View File

@ -843,7 +843,9 @@ def extract_from_xml(filename, target, width):
'seealso': [],
}
if fmt_vimhelp:
fn['desc_node'] = desc # HACK :(
# HACK :(
fn['desc_node'] = desc
fn['brief_desc_node'] = brief_desc
for m in paras:
if 'text' in m:
@ -891,6 +893,8 @@ def fmt_doxygen_xml_as_vimhelp(filename, target):
# Generate Vim :help for parameters.
if fn['desc_node']:
doc = fmt_node_as_vimhelp(fn['desc_node'])
if not doc and fn['brief_desc_node']:
doc = fmt_node_as_vimhelp(fn['brief_desc_node'])
if not doc:
doc = 'TODO: Documentation'