Skip to content

Commit

Permalink
small tweak to filter parser
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Feb 14, 2017
1 parent 7259aef commit dfaf126
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/compiler/parser/filter-parser.js
@@ -1,5 +1,7 @@
/* @flow */

const validDivisionCharRE = /[\w).+\-_$\]]/

export function parseFilters (exp: string): string {
let inSingle = false
let inDouble = false
Expand Down Expand Up @@ -55,7 +57,7 @@ export function parseFilters (exp: string): string {
p = exp.charAt(j)
if (p !== ' ') break
}
if (!p || !/[\w).\]\+\-\_$]/.test(p)) {
if (!p || !validDivisionCharRE.test(p)) {
inRegex = true
}
}
Expand Down

0 comments on commit dfaf126

Please sign in to comment.