WebReflection / vscode-literally-html

Adds syntax highlighting for html inside of JavaScript and TypeScript tagged template strings
https://marketplace.visualstudio.com/items?itemName=webreflection.literally-html
MIT License
34 stars 6 forks source link

Syntax highlighting breaks when a trigger word appears in a nested template string #18

Closed y6nH closed 4 months ago

y6nH commented 4 months ago

Something else must have changed, since this has only appeared recently, but literally-html is the extension I have to disable to fix the problem.

When a trigger word such as "view", "html" or "raw" appears in a template string inside another template string, syntax highlighting doesn't work afterwards.

Here's a potted example:

const ok = `interpolated string ${`some normal words`}`;
const bad = `interpolated string ${`view`}`;
const afterwards = { formatting: "broken" };

image

WebReflection commented 4 months ago

I'm close to abandon this project as this one seems to work better by all means: https://marketplace.visualstudio.com/items?itemName=lehwark.htmx-literals

WebReflection commented 4 months ago

Added a WARNING in the README with suggested alternatives: https://github.com/WebReflection/vscode-literally-html/tree/master?tab=readme-ov-file#warning