meganrogge / template-string-converter

Autocorrect from quotes to backticks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: converter combines separate strings

stuartleeks opened this issue · comments

With template-string-converter.convertOutermostQuotes to true, when opening a curly brace after the $ here:

this.test('first string', 'second string$')

the result is:

this.test(`first string', 'second string${}`)

Note how it has changed the quote on the first string parameter, with the result that the two strings have now become a single string.

The result I expected is:

this.test('first string', `second string${}`)

You can do this by setting template-string-converter.convertOutermostQuotes to false