summaryrefslogtreecommitdiff
path: root/man/make_man_page.py
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-07-12 15:44:15 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-07-12 15:44:15 -0700
commit3494245c36805c24c68996551dc77a5438ae2e8f (patch)
treecfc4848a35a8b5c020b27c6677365b9388962864 /man/make_man_page.py
parent46ac1e61878a6eefea1f3bfff8d25edf8eca0c05 (diff)
Limit generated man page to 72 character line width.
Diffstat (limited to 'man/make_man_page.py')
-rw-r--r--man/make_man_page.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/man/make_man_page.py b/man/make_man_page.py
index fe968b4..c7060e7 100644
--- a/man/make_man_page.py
+++ b/man/make_man_page.py
@@ -31,17 +31,17 @@ parse_document.argtypes = [c_char_p, c_long]
render_man = cmark.cmark_render_man
render_man.restype = c_char_p
-render_man.argtypes = [c_void_p]
+render_man.argtypes = [c_void_p, c_long, c_long]
def md2man(text):
if sys.version_info >= (3,0):
textbytes = text.encode('utf-8')
textlen = len(textbytes)
- return render_man(parse_document(textbytes, textlen)).decode('utf-8')
+ return render_man(parse_document(textbytes, textlen), 0, 65).decode('utf-8')
else:
textbytes = text
textlen = len(text)
- return render_man(parse_document(textbytes, textlen))
+ return render_man(parse_document(textbytes, textlen), 0, 72)
comment_start_re = re.compile('^\/\*\* ?')
comment_delim_re = re.compile('^[/ ]\** ?')