Skip to content

Commit dfaf126

Browse files
committed
small tweak to filter parser
1 parent 7259aef commit dfaf126

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/compiler/parser/filter-parser.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/* @flow */
22

3+
const validDivisionCharRE = /[\w).+\-_$\]]/
4+
35
export function parseFilters (exp: string): string {
46
let inSingle = false
57
let inDouble = false
@@ -55,7 +57,7 @@ export function parseFilters (exp: string): string {
5557
p = exp.charAt(j)
5658
if (p !== ' ') break
5759
}
58-
if (!p || !/[\w).\]\+\-\_$]/.test(p)) {
60+
if (!p || !validDivisionCharRE.test(p)) {
5961
inRegex = true
6062
}
6163
}

0 commit comments

Comments
 (0)