Skip to content

Commit

Permalink
Support more vue expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Quadflieg committed Mar 14, 2020
1 parent 0e11d47 commit b671027
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/utils/vue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
*
* ---
*
* Checks for: `v-bind`, `v-slot`, `v-model` and `v-on`.
* Checks for: `v-bind`, `v-slot`, `v-model`, `v-on`, `v-if`, `v-else-if`,
* `v-for`, `v-text` and `v-html`.
*
* Also shorthands like `:*` and `@*` are checked.
*
Expand All @@ -21,5 +22,5 @@
* @param name Name of tag attribute
*/
export function isVueExpression(name: string): boolean {
return /^((v-bind|v-slot)?:|v-model|v-on|@).*/.test(name);
return /^((v-(bind|slot))?:|v-(model|on|if|for|else-if|text|html)|@).*/.test(name);
}

0 comments on commit b671027

Please sign in to comment.