Closed podfran closed 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.)
Incorrect code is not guaranteed to highlight correctly.
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.)