es6-string-html icon indicating copy to clipboard operation
es6-string-html copied to clipboard

Highlight when string contains valid html

Open GammaGames opened this issue 5 years ago • 4 comments

It would be nice if we had the option to format all template strings that contain valid html (or match ^<\w+.*>) to remove the need for distracting comments

GammaGames avatar Apr 05 '19 14:04 GammaGames

Hi Thanks a lot for using my plugin I'll try to do it, but it's not the easily implementable feature, because of some vscode limitations, afaik

0x00000001A avatar Apr 06 '19 04:04 0x00000001A

+1 It would be nice if you can enable auto recognition and the regex may be ^\s*<\w+[\s\S]*>\s*$. This allows whitespace characters on both sides.

You can also divide the pattern into beginning ( ^\s*<\w+) and end (>\s*). Also matching just the beginning should be good enough. @mydesireiscoma Great work so far! This extension is precious and the autorecognition mechanism would make it invaluable.

desislavsd avatar Apr 11 '19 15:04 desislavsd

@GammaGames @desislavsd I'm sorry to say, but for now, I can't find a way to solve it without breaking standard string behavior. The main problem is limited regexp support in VSCode. VSCode does not support multiline regexp patterns. Anyway, I'll continue searching for a solution

0x00000001A avatar May 06 '19 02:05 0x00000001A

Any progress on this? My project guidelines don't allow me for adding the needed comment and I'm kinda lost within big HTML templates without highlighting.

mrfloppi avatar Nov 13 '19 11:11 mrfloppi