vscode-language-renpy icon indicating copy to clipboard operation
vscode-language-renpy copied to clipboard

False identification of '"$" starts a one-line Python statement' with multi-line say statement

Open Dingotush opened this issue 2 years ago • 2 comments

Extension version

2.0.16, 2.1.17

Issue description

A multi-line say statement containing the '$' character, (Note sofia is a character, tip is an integer variable.), such as:

        sofia "Lets see how you made out with tips this evening.
            A very respectable $[tip] you've earned!"

incorrectly reported a warning: "$" starts a one-line Python statement, but was found in the middle of the line.

In an ideal world this would by identified as a multi-line RenPy say statement, not a Python one, and not flag this as a warning. If this is not possible, a way to disable this specific warning would be useful.

Note: If the what text containing a $ is on a single line, no warning is reported.

Scope inspector screenshots

multi-line-dollar

Code

    sofia "Lets see how you made out with tips this evening.
        A very respectable $[tip] you've earned!"

Dingotush avatar Apr 05 '23 06:04 Dingotush

Thanks for the report, that's definitely a bug that should be fixed. It's a bug in the diagnostics section of the extension. A simple update to the regex to detect strings should do.

duckdoom4 avatar Apr 05 '23 07:04 duckdoom4

Related to #171

duckdoom4 avatar Jul 10 '24 20:07 duckdoom4