diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-01-26 21:41:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-26 21:41:01 +0100 |
commit | d63b534f313326c79c7b9feaf51ca0d798dd65db (patch) | |
tree | 74589afd6caa2264fab7f543de1d2a510da9b558 /scripts/gen_api_vimdoc.py | |
parent | 2132bbf9199bf019602584935965c495b1dc180b (diff) | |
parent | cd64f5abd46e24509b8650f7ecfa30d3f0152b0e (diff) | |
download | rneovim-d63b534f313326c79c7b9feaf51ca0d798dd65db.tar.gz rneovim-d63b534f313326c79c7b9feaf51ca0d798dd65db.tar.bz2 rneovim-d63b534f313326c79c7b9feaf51ca0d798dd65db.zip |
Merge #9478 from justinmk/doc
Diffstat (limited to 'scripts/gen_api_vimdoc.py')
-rwxr-xr-x | scripts/gen_api_vimdoc.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/gen_api_vimdoc.py b/scripts/gen_api_vimdoc.py index 4e86f15b37..515964bfe8 100755 --- a/scripts/gen_api_vimdoc.py +++ b/scripts/gen_api_vimdoc.py @@ -158,9 +158,12 @@ def doc_wrap(text, prefix='', width=70, func=False): lines[-1] += part return '\n'.join(x.rstrip() for x in lines).rstrip() - return '\n'.join(textwrap.wrap(text.strip(), width=width, - initial_indent=prefix, - subsequent_indent=indent_space)) + tw = textwrap.TextWrapper(break_long_words = False, + break_on_hyphens = False, + width=width, + initial_indent=prefix, + subsequent_indent=indent_space) + return '\n'.join(tw.wrap(text.strip())) def parse_params(parent, width=62): |