Merge pull request #6 from idle-org/bugfix/wrong-ulist-detection

Hotfix on the syntax with ulists
This commit is contained in:
Vicky 2022-06-15 13:30:41 +02:00 committed by GitHub
commit 22d61179e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -538,12 +538,12 @@ one_display = (
pp.Opt(optional)
).add_parse_action(of_type(DisplayToken))
one_olist = pp.line_start + (
pps(pp.Literal('#.')) + (
pps(pp.Combine(pp.line_start + pp.Literal('#.'))) + (
(pp.SkipTo(optional)('text').add_parse_action(reparse(enhanced_text)) + optional) |
enhanced_text)
).add_parse_action(of_type(EtOlistToken))
one_ulist = pp.line_start + (
pps(pp.Literal('-')) + (
pps(pp.Combine(pp.line_start + pp.Literal('-'))) + (
(pp.SkipTo(optional)('text').add_parse_action(reparse(enhanced_text)) + optional) |
enhanced_text)
).add_parse_action(of_type(EtUlistToken))

View File

@ -524,6 +524,7 @@ dict_advanced_syntax_input_and_expected_output = {
), __GL()),
("|---|---|", (sy.TableSeparatorToken(["---", "---"]),), __GL()),
("- Text", (sy.EtUlistToken([sy.TextToken(["Text"])]),), __GL()),
(" - Non ulist", (sy.TextToken(["- Non ulist"]),), __GL()),
("div>>", (sy.StructuralElementEndToken(["div"]),), __GL()),
("body>>", (sy.StructuralElementEndToken(["body"]),), __GL()),
("#. Text with *em* and __underline__ and {arguments}{{super-arguments}}[a=1, c=2,'ui']", (
@ -667,6 +668,7 @@ list_of_text_input_and_readable_output = [
# Other Mostly for testing and coverage
("'", "quotes", "'"),
(" -", "line", "-"),
]