cmark

My personal build of CMark ✏️

Commit
4a7d305d220a4081ac7c106199baa940d838ce67
Parent
0361517cdebad5b01433bb996e395de39d018a68
Author
John MacFarlane <jgm@berkeley.edu>
Date

Fixed md2man for python3.

Partially addresses #254.

This change makes make_man_page.py work with either python3 or python2.

The test suite is still dependent on python2, and this should be changed, but for now this at least makes a build possible.

Diffstat

1 file changed, 2 insertions, 2 deletions

Status File Name N° Changes Insertions Deletions
Modified man/make_man_page.py 4 2 2
diff --git a/man/make_man_page.py b/man/make_man_page.py
@@ -37,11 +37,11 @@ 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')
     else:
         textbytes = text
         textlen = len(text)
-    return render_man(parse_document(textbytes, textlen))
-
+        return render_man(parse_document(textbytes, textlen))
 
 comment_start_re = re.compile('^\/\*\* ?')
 comment_delim_re = re.compile('^[/ ]\** ?')