Skip to content

fix: directive syntax highlighting #4482

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

Merged
merged 2 commits into from
Jun 21, 2024
Merged

Conversation

kermanx
Copy link
Collaborator

@kermanx kermanx commented Jun 20, 2024

fix #2550.

Before After
image image

About the regex

(?:(?:(v-[\w-]+)(:)?)|([:\.])|(@)|(#))(?:(?:(\[)([^\]]*)(\]))|([\w-]+))?
                  |                         \
(?:(?:(v-[\w-]+)(:)?)|([:\.])|(@)|(#))   (?:(?:(\[)([^\]]*)(\]))|([\w-]+))?
   v-a                                      <omit>                      Then, modifiers or expression
   v-a:                                     [expr]
   #                                        attr-name
   :
   .
   @

@kermanx kermanx marked this pull request as draft June 20, 2024 10:45
@kermanx kermanx marked this pull request as ready for review June 20, 2024 10:59
@johnsoncodehk
Copy link
Member

This is awesome, thanks!

@johnsoncodehk johnsoncodehk merged commit 07f1f1d into vuejs:master Jun 21, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

自定义指令的语法高亮问题
2 participants