GNOME Bugzilla – Bug 784673
Wrong syntax highlighting of Python statement "matches = re.findall(r'href=[\'"]?([^\'" >]+)', url_data)"
Last modified: 2017-11-16 14:59:07 UTC
Created attachment 355125 [details] a screenshot demonstrating the issue Entering the statement `matches = re.findall(r'href=[\'"]?([^\'" >]+)', url_data)` and switching the syntax highlighting to `Python` (i.e. Python 2.x), the syntax highlighting visible in the attached screenshot is rendered which makes the statement appear incorrect, but it's a valid statement. experienced with 3.22.0 on Ubuntu 17.04 amd64
Created attachment 363781 [details] [review] python.lang: recognize escape sequences in raw strings Raw strings can still contain escape sequences. In particular, the quote character can be escaped. However, the escape sequences are interpreted literally (i.e., as a backslash followed by other characters). Illustrate that by suppressing the style of the escaped-char context. Line continuations are interpreted literally inside raw strings too (as a backslash and a newline), so suppress the style for those, as well.
Thanks! By opening the test file I see that the problem is fixed, so it looks good. I'll probably cherry-pick the commit to the gnome-3-24 branch. Attachment 363781 [details] pushed as 3024375 - python.lang: recognize escape sequences in raw strings