This is the only lingering problem in minirst on Python
- test-minirst.py now passes on Python 3.
pulkit |
hg-reviewers |
This is the only lingering problem in minirst on Python
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | contrib/python3-whitelist (1 line) | |||
M | mercurial/minirst.py (2 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
Augie Fackler | Apr 27 2018, 12:50 AM |
test-merge2.t | test-merge2.t | ||||
test-merge4.t | test-merge4.t | ||||
test-merge5.t | test-merge5.t | ||||
test-merge6.t | test-merge6.t | ||||
test-merge7.t | test-merge7.t | ||||
test-merge8.t | test-merge8.t | ||||
test-merge9.t | test-merge9.t | ||||
test-minifileset.py | test-minifileset.py | ||||
test-minirst.py | |||||
test-mq-git.t | test-mq-git.t | ||||
test-mq-header-date.t | test-mq-header-date.t | ||||
test-mq-header-from.t | test-mq-header-from.t | ||||
test-mq-merge.t | test-mq-merge.t | ||||
test-mq-pull-from-bundle.t | test-mq-pull-from-bundle.t | ||||
test-mq-qclone-http.t | test-mq-qclone-http.t | ||||
test-mq-qdelete.t | test-mq-qdelete.t | ||||
test-mq-qdiff.t | test-mq-qdiff.t |
A list item can be followed by an indented line or another list | A list item can be followed by an indented line or another list | ||||
item (but only if singleline is True). | item (but only if singleline is True). | ||||
""" | """ | ||||
line1 = lines[i] | line1 = lines[i] | ||||
line2 = i + 1 < len(lines) and lines[i + 1] or '' | line2 = i + 1 < len(lines) and lines[i + 1] or '' | ||||
if not itemre.match(line1): | if not itemre.match(line1): | ||||
return False | return False | ||||
if singleline: | if singleline: | ||||
return line2 == '' or line2[0] == ' ' or itemre.match(line2) | return line2 == '' or line2[0:1] == ' ' or itemre.match(line2) | ||||
else: | else: | ||||
return line2.startswith(' ') | return line2.startswith(' ') | ||||
i = 0 | i = 0 | ||||
while i < len(blocks): | while i < len(blocks): | ||||
if blocks[i]['type'] == 'paragraph': | if blocks[i]['type'] == 'paragraph': | ||||
lines = blocks[i]['lines'] | lines = blocks[i]['lines'] | ||||
for type, itemre, singleline in listtypes: | for type, itemre, singleline in listtypes: |