tomblachut / svelte-intellij

Svelte components in WebStorm and friends
MIT License
482 stars 38 forks source link

Chokes when there is an apostrophe in comments #119

Closed shirotech closed 4 years ago

shirotech commented 4 years ago

I'm using the latest from #100

A really weird parsing issue.

before: Screen Shot 2020-05-26 at 8 16 23 am

after: Screen Shot 2020-05-26 at 8 16 45 am

Notice when I remove the apostrophe, it works fine.

tomblachut commented 4 years ago

I admit that I underestimated that rewrite

tomblachut commented 4 years ago

This is really interesting, I left a bug in rules about counting braces and string literals.

Consider this snippet:

<div>
    {
        'unclosed string literal inside expression
    }
</div>

script/style tags are an edge case