# HG changeset patch # User Augie Fackler # Date 1496000863 14400 # Node ID 9d08283946f0d5597e7d847ff9c76ec9d8ea4db7 # Parent 043c147c928d486b3f80de340eff99ae0529d1c9 minirst: look for column delimiters using slices instead of indicies This works on both Python 2 and 3. diff -r 043c147c928d -r 9d08283946f0 mercurial/minirst.py --- a/mercurial/minirst.py Sun May 28 13:36:02 2017 -0400 +++ b/mercurial/minirst.py Sun May 28 15:47:43 2017 -0400 @@ -315,7 +315,8 @@ # column markers are ASCII so we can calculate column # position in bytes columns = [x for x in xrange(len(div)) - if div[x] == '=' and (x == 0 or div[x - 1] == ' ')] + if div[x:x + 1] == '=' and (x == 0 or + div[x - 1:x] == ' ')] rows = [] for l in block['lines'][1:-1]: if l == div: