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 directives containing numbers #1465

Merged
merged 2 commits into from
Dec 12, 2019

Conversation

niklashigi
Copy link
Contributor

Currently directives are not correctly highlighted if their names contain numbers. This makes templates containing "dynamic SVG" pretty unreadable as the names of many SVG attributes (x1, k1, in2, etc.) contain numbers. Changing the pattern to allow digits in the directive name fixes this problem:

Before After
Before After

I know that the Vue grammar is technically not meant to encompass SVG, but I don't see how this change negatively affects HTML highlighting.

@octref
Copy link
Member

octref commented Dec 11, 2019

Old build failed and is gone. I rebased and added some test.

@octref
Copy link
Member

octref commented Dec 12, 2019

Good job. Thank you!

@octref octref merged commit df229d1 into vuejs:master Dec 12, 2019
octref added a commit that referenced this pull request Dec 12, 2019
@vue-bot
Copy link

vue-bot commented Dec 12, 2019

Thanks again! 💚

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants