# HG changeset patch # User Paul Boddie # Date 1533578979 -7200 # Node ID 9562cd43d480e468651b86c06af23808b660e8d8 # Parent 7010e0c938533e621740cd85bad29e846067eb7c Support spaced list items by disregarding empty lines as item terminators. Changed the expected representation for test data where empty lines would have been interpreted as paragraph breaks following lists. diff -r 7010e0c93853 -r 9562cd43d480 moinformat/parsers/moin.py --- a/moinformat/parsers/moin.py Mon Aug 06 15:52:38 2018 +0200 +++ b/moinformat/parsers/moin.py Mon Aug 06 20:09:39 2018 +0200 @@ -703,7 +703,8 @@ # ws... "listitemend" : join((r"^", # next line - choice((excl(r"\N"), # without indent + choice((expect(r"[^\s]"), # without indent + expect(r"\Z"), # end of string expect(r"\N+\*"), # or with ws... list-marker expect(r"\N+\d\."), # or with ws... decimal-marker expect(r"\N+[aA]\."), # or with ws... alpha-marker diff -r 7010e0c93853 -r 9562cd43d480 tests/test_lists2.tree --- a/tests/test_lists2.tree Mon Aug 06 15:52:38 2018 +0200 +++ b/tests/test_lists2.tree Mon Aug 06 20:09:39 2018 +0200 @@ -4,7 +4,6 @@ List ListItem Text - Break List ListItem Text @@ -30,7 +29,6 @@ List ListItem Text - Break List ListItem Text @@ -46,12 +44,10 @@ List ListItem Text - Break List ListItem Text ListItem Text - Break Block Text