pushqrdx / vscode-inline-html

🎨 Adding Syntax Highlighting, Emmet, IntelliSense support for ES6 Template Strings in Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=pushqrdx.inline-html
GNU General Public License v3.0
54 stars 15 forks source link

Support /* html */ #5

Closed daKmoR closed 5 years ago

daKmoR commented 5 years ago

It would be nice to support a syntax like

return /* html */`
    <h2>foo</h2>
  `;

as well.

Especially as eslint usually will complain if you write it like this /*html*/.

so you end up writing it like this :(

// eslint-disable-next-line spaced-comment
return /*html*/`
    <h2>foo</h2>
  `;
pushqrdx commented 5 years ago

@daKmoR this shouldn't be hard. I'll try to get to it this weekend.

Regards!

pushqrdx commented 5 years ago

@daKmoR 😂 it's kinda funny but i just realized that i already included /*html*/while I was developing this extension so it should work. Have you actually tried to do

/*html*/`

`

image

daKmoR commented 5 years ago

yes /*html*/ works but it results in an eslint error... (as desribed above)

So my request is to adjust the regex a little to also allow /* html */

pushqrdx commented 5 years ago

@daKmoR I am so stupid 😅. Completely overlooked your main post. Just published a new version, 0.1.0, which allows you to do /* html */ or /* html */ or whatever space(s) you would want. Please give it a try.

daKmoR commented 5 years ago

thhhxxx ❤️ 🤗 that works perfectly 🎉