vim-python / python-syntax

Python syntax highlighting for Vim
MIT License
438 stars 84 forks source link

Strings not coloured across multiple lines #52

Closed podfran closed 5 years ago

podfran commented 5 years ago

Vim does not colour strings properly, when the string is broken across multiple lines.

E.g. if this line: return "Name: {0.name}, Lives: {0.lives}, Level: {0.level}, Score: {0.score}".format(player) is broken like so: return ("Name: {0.name}, Lives: {0.lives}, ___Level: {0.level}, Score: {0.score}".format(player)) the string highlighting stops at the end of the first line and then starts again in the next after the double quote.

(Sorry for the underscores, couldn't find a better way to represent the indentation I needed.)

snakeneedy commented 5 years ago

The code

return ("Name: {0.name}, Lives: {0.lives},
        Level: {0.level}, Score: {0.score}".format(player))

causes SyntaxError. I don't think error code should be correctly rendered.

(GitHub doesn't render as you wish, either.)

nfnty commented 5 years ago

Incorrect code is not guaranteed to highlight correctly.