renpy/vscode-language-renpy

Unclosed text tag causes string formatting to continue beyond the end of a string

Queex opened this issue · 3 comments

Queex commented

Extension version

2.2.0

Issue description

Text tags will cause string formatting to be applied until a matching closing string tag is found, even across non-string code or to the end of the file is no closing tag exists.

This is not desirable, even as an attempt to detect unclosed tags, because it is destructive to following formatting.

Scope inspector screenshots

image

Code

screen some_screen(msg):
text "{b}"+msg+"{/b}"

Ah yes, I'll get this fixed tomorrow. Also see #282

Just wanted to add that Ren'Py is no longer recommending text tags like {b} and {i} be closed if it affects the rest of a string, so "This is {b}bold." is valid. This, combined with situations where a creator may use formatting or fstrings to add text tags, means that searching for matching text tags is potentially better left alone at the moment.

Yes, I plan on disabling this functionality for the time being. We have some new features in the works that will allow us to properly parse these tags. This is better suited for a semantic highlighter instead of the syntax highlighter