Skip to content

Commit 589bb8f

Browse files
committed
unit tests pass
1 parent 8ce2b3d commit 589bb8f

File tree

2 files changed

+135
-173
lines changed

2 files changed

+135
-173
lines changed

src/directive.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
var dirId = 1,
2-
ARG_RE = /^[\w-]+$/,
2+
ARG_RE = /^[\w\$-]+$/,
33
FILTER_TOKEN_RE = /[^\s'"]+|'[^']+'|"[^"]+"/g,
44
NESTING_RE = /^\$(parent|root)\./,
55
SINGLE_VAR_RE = /^[\w\.$]+$/,
@@ -165,7 +165,7 @@ Directive.parse = function (str) {
165165
argIndex = i + 1
166166
dir.arg = str.slice(begin, i).trim()
167167
}
168-
} else if (c === '|' && str.charAt(i + 1) !== '|') {
168+
} else if (c === '|' && str.charAt(i + 1) !== '|' && str.charAt(i - 1) !== '|') {
169169
if (dir.key === undefined) {
170170
// first filter, end of key
171171
lastFilterIndex = i + 1

0 commit comments

Comments
 (0)