cyrusfirheir / twee3-language-tools

[ VSCode extension ] Syntax highlighting and programmatic language tools for Twee 3, and Twine 2 storyformats.
https://marketplace.visualstudio.com/items?itemName=cyrusfirheir.twee3-language-tools
MIT License
47 stars 15 forks source link

[Sugarcube 2] "Malformed container macro! Opening tag not found!" in backtick-enclosed multi-line string #153

Closed GermanWithSherman closed 10 months ago

GermanWithSherman commented 10 months ago

Backtick-enclosed strings are able to enclose more than one line. Sugarcube appears to support this.

The following code produces the expected result (containerMacro is defined as container-macro with one string-parameter).

<<set _text = `Some nice text with a <<containerMacro 'A1'>><</containerMacro>>
That goes on on a second line`>>

Nevertheless, twee3-language-tools marks the closing tag of the macro as error: Malformed container macro! Opening 'containerMacro' tag not found!

This error does not occur if the string only uses one line. This code has no error highlighted:

<<set _text = `Some nice text with a <<containerMacro 'A1'>><</containerMacro>> That doesn't go on on a second line`>>