Hotfix on the syntax with ulits

This commit is contained in:
Maximilien Rigaut 2022-06-15 13:15:03 +02:00
parent a2ae3c5d0e
commit 0f55dcd523
No known key found for this signature in database
GPG Key ID: 4F14B23709ADA5B1
2 changed files with 4 additions and 2 deletions

View File

@ -535,12 +535,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()),
("#. Text with *em* and __underline__ and {arguments}{{super-arguments}}[a=1, c=2,'ui']", (
sy.EtOlistToken([
@ -666,6 +667,7 @@ list_of_text_input_and_readable_output = [
# Other Mostly for testing and coverage
("'", "quotes", "'"),
(" -", "line", "-"),
]