Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highlight when string contains valid html #21

Open
GammaGames opened this issue Apr 5, 2019 · 4 comments
Open

Highlight when string contains valid html #21

GammaGames opened this issue Apr 5, 2019 · 4 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@GammaGames
Copy link

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

@0x00000001A 0x00000001A self-assigned this Apr 6, 2019
@0x00000001A 0x00000001A added the enhancement New feature or request label Apr 6, 2019
@0x00000001A
Copy link
Owner

0x00000001A commented Apr 6, 2019

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

@desislavsd
Copy link

desislavsd commented Apr 11, 2019

+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.

@0x00000001A
Copy link
Owner

@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

@mrfloppi
Copy link

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.

@0x00000001A 0x00000001A added the help wanted Extra attention is needed label Nov 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants