minirst: fix bytes slicing defect on Python 3
This is the only lingering problem in minirst on Python
3. test-minirst.py now passes on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D3478
--- a/contrib/python3-whitelist Fri Apr 27 00:46:05 2018 -0400
+++ b/contrib/python3-whitelist Fri Apr 27 00:50:08 2018 -0400
@@ -258,6 +258,7 @@
test-merge8.t
test-merge9.t
test-minifileset.py
+test-minirst.py
test-mq-git.t
test-mq-header-date.t
test-mq-header-from.t
--- a/mercurial/minirst.py Fri Apr 27 00:46:05 2018 -0400
+++ b/mercurial/minirst.py Fri Apr 27 00:50:08 2018 -0400
@@ -169,7 +169,7 @@
if not itemre.match(line1):
return False
if singleline:
- return line2 == '' or line2[0] == ' ' or itemre.match(line2)
+ return line2 == '' or line2[0:1] == ' ' or itemre.match(line2)
else:
return line2.startswith(' ')