mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
gen_api_vimdoc.py: add whitespace before "~"
This commit is contained in:
parent
1999919c31
commit
0615450688
@ -188,7 +188,7 @@ def parse_params(parent, width=62):
|
|||||||
desc = parse_parblock(desc_node, width=None)
|
desc = parse_parblock(desc_node, width=None)
|
||||||
items.append((name.strip(), desc.strip()))
|
items.append((name.strip(), desc.strip()))
|
||||||
|
|
||||||
out = 'Parameters:~\n'
|
out = 'Parameters: ~\n'
|
||||||
for name, desc in items:
|
for name, desc in items:
|
||||||
name = ' %s' % name.ljust(name_length)
|
name = ' %s' % name.ljust(name_length)
|
||||||
out += doc_wrap(desc, prefix=name, width=width) + '\n'
|
out += doc_wrap(desc, prefix=name, width=width) + '\n'
|
||||||
@ -229,7 +229,7 @@ def parse_para(parent, width=62):
|
|||||||
prefix=' ',
|
prefix=' ',
|
||||||
width=width))
|
width=width))
|
||||||
elif kind == 'return':
|
elif kind == 'return':
|
||||||
lines.append('%s:~' % kind.title())
|
lines.append('%s: ~' % kind.title())
|
||||||
lines.append(doc_wrap(parse_para(child),
|
lines.append(doc_wrap(parse_para(child),
|
||||||
prefix=' ',
|
prefix=' ',
|
||||||
width=width))
|
width=width))
|
||||||
@ -361,16 +361,16 @@ def parse_source_xml(filename):
|
|||||||
|
|
||||||
annotations = '\n'.join(annotations)
|
annotations = '\n'.join(annotations)
|
||||||
if annotations:
|
if annotations:
|
||||||
annotations = ('\n\nAttributes:~\n' +
|
annotations = ('\n\nAttributes: ~\n' +
|
||||||
textwrap.indent(annotations, ' '))
|
textwrap.indent(annotations, ' '))
|
||||||
i = doc.rfind('Parameters:~')
|
i = doc.rfind('Parameters: ~')
|
||||||
if i == -1:
|
if i == -1:
|
||||||
doc += annotations
|
doc += annotations
|
||||||
else:
|
else:
|
||||||
doc = doc[:i] + annotations + '\n\n' + doc[i:]
|
doc = doc[:i] + annotations + '\n\n' + doc[i:]
|
||||||
|
|
||||||
if 'INCLUDE_C_DECL' in os.environ:
|
if 'INCLUDE_C_DECL' in os.environ:
|
||||||
doc += '\n\nC Declaration:~\n>\n'
|
doc += '\n\nC Declaration: ~\n>\n'
|
||||||
doc += c_decl
|
doc += c_decl
|
||||||
doc += '\n<'
|
doc += '\n<'
|
||||||
|
|
||||||
@ -441,7 +441,7 @@ def gen_docs(config):
|
|||||||
doc += '\n\n' + functions
|
doc += '\n\n' + functions
|
||||||
|
|
||||||
if 'INCLUDE_DEPRECATED' in os.environ and deprecated:
|
if 'INCLUDE_DEPRECATED' in os.environ and deprecated:
|
||||||
doc += '\n\n\nDeprecated %s Functions:~\n\n' % name
|
doc += '\n\n\nDeprecated %s Functions: ~\n\n' % name
|
||||||
doc += deprecated
|
doc += deprecated
|
||||||
|
|
||||||
if doc:
|
if doc:
|
||||||
|
Loading…
Reference in New Issue
Block a user