File tree 1 file changed +18
-9
lines changed
1 file changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -51,15 +51,7 @@ function pushFilter () {
51
51
var tokens = exp . match ( filterTokenRE )
52
52
filter . name = tokens [ 0 ]
53
53
if ( tokens . length > 1 ) {
54
- filter . args = tokens . slice ( 1 ) . map ( function ( arg ) {
55
- var stripped = reservedArgRE . test ( arg )
56
- ? arg
57
- : _ . stripQuotes ( arg )
58
- return {
59
- value : stripped || arg ,
60
- dynamic : ! stripped
61
- }
62
- } )
54
+ filter . args = tokens . slice ( 1 ) . map ( processFilterArg )
63
55
}
64
56
}
65
57
if ( filter ) {
@@ -68,6 +60,23 @@ function pushFilter () {
68
60
lastFilterIndex = i + 1
69
61
}
70
62
63
+ /**
64
+ * Check if an argument is dynamic and strip quotes.
65
+ *
66
+ * @param {String } arg
67
+ * @return {Object }
68
+ */
69
+
70
+ function processFilterArg ( arg ) {
71
+ var stripped = reservedArgRE . test ( arg )
72
+ ? arg
73
+ : _ . stripQuotes ( arg )
74
+ return {
75
+ value : stripped || arg ,
76
+ dynamic : ! stripped
77
+ }
78
+ }
79
+
71
80
/**
72
81
* Parse a directive string into an Array of AST-like
73
82
* objects representing directives.
You can’t perform that action at this time.
0 commit comments