python icon indicating copy to clipboard operation
python copied to clipboard

raw-string regex comment

Open petervaro opened this issue 7 years ago • 0 comments

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.

petervaro avatar Dec 21 '17 17:12 petervaro