template-string-converter icon indicating copy to clipboard operation
template-string-converter copied to clipboard

Convert outermost quotes messed up

Open asportnoy opened this issue 1 year ago • 0 comments

Take this sample code:

const example = {
	'hello': 'world',
};

When "Convert outermost quotes" is enabled, adding a template string to the value will give this result:

const example = {
	`hello': 'world ${test}`,
//      ^                      ^
};

Seems like it thinks both the key and value are the same string, when they are actually 2 different strings.

asportnoy avatar May 19 '23 15:05 asportnoy