You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RustPython sre module fail to match HTMLParser regex #3836
locatestarttagend_tolerant = re.compile(r"""
<[a-zA-Z][^\t\n\r\f />\x00]* # tag name
(?:[\s/]* # optional whitespace before attribute name
(?:(?<=['"\s/])[^\s/>][^\s/=>]* # attribute name
(?:\s*=+\s* # value indicator
(?:'[^']*' # LITA-enclosed value
|"[^"]*" # LIT-enclosed value
|(?!['"])[^>\s]* # bare value
)
(?:\s*,)* # possibly followed by a comma
)?(?:\s|/(?!>))*
)*
)?
\s* # trailing whitespace
""", re.VERBOSE)
Until now I find these expr has incorrect results:
p.match("<foo one=1 two=2>") # two=2 not in match
p.match(r"<foo \n one>") # one not in match but correct if not raw string(without r)
Activity
youknowone commentedon Jul 19, 2022
minimal reproducible example:
qingshi163 commentedon Jul 19, 2022
Thanks, I am working on sre-engine
fanninpm commentedon Jul 28, 2022
Is this solved now?
qingshi163 commentedon Jul 29, 2022
Yes, it is