From 072e03a7861581fc3074476288524551839e624a Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Tue, 15 Mar 2022 15:48:22 +0100 Subject: [PATCH] Updated the TODOs (sic) --- src/bootstraparse/modules/syntax.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bootstraparse/modules/syntax.py b/src/bootstraparse/modules/syntax.py index 12a527d..b0a535e 100644 --- a/src/bootstraparse/modules/syntax.py +++ b/src/bootstraparse/modules/syntax.py @@ -211,10 +211,10 @@ se = se_end | se_start # Structural element # TODO Check nomenclature il_link = pp.Literal('[') + ... + pp.Literal('](') + pp.QuotedString("'\"", esc_char='\\') + ')' # Oneline elements -# TODO: one_header should match any number of '#' -one_header = (pp.Literal('#') + ... + pps(pp.Literal('#'))).add_parse_action(of_type(HeaderToken)) +# TODO: one_header should match any number of '#' I suggest either a div_element=Word("#") or a div_element=OneOrMore(pp.Literal('#')) with a pp.match_previous_literal(dive=_element) # noqa E501 (line too long) +one_header = (pp.Literal('#') + ... + pps(" "+'#')).add_parse_action(of_type(HeaderToken)) -# TODO: Don't use "^" (longest match wins) use "|" (first match wins) # TODO: add a ("name") ? +# TODO: Don't use "^" (longest match wins) use "|" (first match wins) # TODO: add a ("name") ? # TODO: Suppress the "." one_olist = pp.line_start + \ ((pp.Word(pp.nums) ^ pp.Word('#')) + '.' + ... + pp.line_end).add_parse_action(of_type(EtOlistToken))