From b1129d60d3258a6d92cfd704a6c81ef3bc317493 Mon Sep 17 00:00:00 2001 From: vicky Date: Wed, 16 Mar 2022 15:12:24 +0100 Subject: [PATCH] fixed il_link --- src/bootstraparse/modules/syntax.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bootstraparse/modules/syntax.py b/src/bootstraparse/modules/syntax.py index cc2a6e4..3f31ce9 100644 --- a/src/bootstraparse/modules/syntax.py +++ b/src/bootstraparse/modules/syntax.py @@ -202,7 +202,7 @@ se_end = (structural_elements + '>>').add_parse_action(of_type(StructuralElement se = se_end | se_start # Structural element # TODO Check nomenclature # Inline elements -il_link = pp.Literal('[') + ... + pp.Literal('](') + pp.QuotedString("'\"", esc_char='\\') + ')' +il_link = pp.Literal('[') + ... + pp.Literal('](') + quotes + http_characters + pp.match_previous_literal(quotes) + ')' # Oneline elements # 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)