minirst: grab a byte, not an int, for the underline style
authorAugie Fackler <raf@durin42.com>
Sun, 28 May 2017 13:36:02 -0400
changeset 32525 043c147c928d
parent 32524 6e9a2c9c1f37
child 32526 9d08283946f0
minirst: grab a byte, not an int, for the underline style
mercurial/minirst.py
--- a/mercurial/minirst.py	Sun May 28 13:41:42 2017 -0400
+++ b/mercurial/minirst.py	Sun May 28 13:36:02 2017 -0400
@@ -356,7 +356,7 @@
             len(block['lines']) == 2 and
             encoding.colwidth(block['lines'][0]) == len(block['lines'][1]) and
             _sectionre.match(block['lines'][1])):
-            block['underline'] = block['lines'][1][0]
+            block['underline'] = block['lines'][1][0:1]
             block['type'] = 'section'
             del block['lines'][1]
     return blocks