svelte-intellij icon indicating copy to clipboard operation
svelte-intellij copied to clipboard

Expressions inside title tag are parsed as plain text

Open r00t3g opened this issue 3 years ago • 4 comments

Therefore, as the variable is treated as unused, its import gets removed when running 'Reformat code' with 'Optimize imports' option. Apart from all other problems like not found usages etc.

image

r00t3g avatar Mar 30 '21 21:03 r00t3g

Hi. It should work in latest release. What version of plugin and IDE are you running? Also, what "SUBJ" means? Thanks

tomblachut avatar Apr 06 '21 11:04 tomblachut

@tomblachut IDE is IntelliJ Idea 2020.3.3, plugin - 0.18.0.203 Removed the SUBJ, sorry :)

It looks that it breaks only when the variable usage follows some text and works OK in any other case: image

Cmd/Ctrl+Click navigation also seems not to work the variable.

r00t3g avatar Apr 06 '21 16:04 r00t3g

Oh ok, I've reproduced the problem. Thanks for reporting.

This is a bug in parser. Happens specifically inside title and similar because according to MDN only text is allowed inside

tomblachut avatar Apr 06 '21 18:04 tomblachut

This is actually a regression 😔 https://youtrack.jetbrains.com/issue/WEB-41745.

Related to #142

tomblachut avatar May 31 '21 12:05 tomblachut

Migrated to WEB-61785 Svelte: properly parse title tag content

tomblachut avatar Jul 03 '23 09:07 tomblachut