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

login
register
mail settings
Submitter Augie Fackler
Date May 28, 2017, 8:58 p.m.
Message ID <90be401bce985bff41cc.1496005139@imladris.local>
Download mbox | patch
Permalink /patch/20999/
State Accepted
Headers show

Comments

Augie Fackler - May 28, 2017, 8:58 p.m.
# HG changeset patch
# User Augie Fackler <raf@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

Patch

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