The re.VERBOSE flag allows to write comments inside the string, however that comment should end at the end of string. The current behaviour is broken:
pattern = compile(r"""
\d\t
# this part is a comment""", MULTILINE | VERBOSE)
# ^
# should end here
Currently the entire line is highlighted as a comment.
The
re.VERBOSEflag allows to write comments inside the string, however that comment should end at the end of string. The current behaviour is broken:Currently the entire line is highlighted as a comment.