[PATCH 3 of 8 py3] minirst: grab a byte, not an int, for the underline style

Augie Fackler raf at durin42.com
Sun May 28 16:58:59 EDT 2017


# HG changeset patch
# User Augie Fackler <raf at durin42.com>
# Date 1495992962 14400
#      Sun May 28 13:36:02 2017 -0400
# Node ID 90be401bce985bff41ccb8f1ed463329ff629ca8
# Parent  37a72a324f8cd47da65756b888b5e0b8cfd600ae
minirst: grab a byte, not an int, for the underline style

diff --git a/mercurial/minirst.py b/mercurial/minirst.py
--- a/mercurial/minirst.py
+++ b/mercurial/minirst.py
@@ -356,7 +356,7 @@ def findsections(blocks):
             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


More information about the Mercurial-devel mailing list