Python syntax highlighting problem (strings)

Vitaliy Kravtsov 12 years ago updated 12 years ago 5
Textastic 3.2

Incorrect string end detection when string contains unclosed [

Test case:
Can you please send me a small .py file that has this problem to support@textasticapp.com?

thanks for sending the file.

Textastic uses syntax definitions from TextMate. I tested your file in TextMate and it has the same syntax highlighting problem. 

This seems to be a known issue with regex highlighting in strings in the Python bundle. 

On Github, I found this issue: https://github.com/textmate/python.tmbundle/issues/1 - it doesn't seem to be fixed yet.
You can see the cause of this issue in the first comment:

Raw strings are explicitly set up to do regex pattern styling, so having a non-regex in a raw string will, as you see, mess things up.
(I'm not arguing for or against this behavior.)
Ok, I see.... That isn't big deal)
Thanks for your amazing app again!