File tree Expand file tree Collapse file tree 1 file changed +18
-9
lines changed Expand file tree Collapse file tree 1 file changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -51,15 +51,7 @@ function pushFilter () {
5151 var tokens = exp . match ( filterTokenRE )
5252 filter . name = tokens [ 0 ]
5353 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 )
6355 }
6456 }
6557 if ( filter ) {
@@ -68,6 +60,23 @@ function pushFilter () {
6860 lastFilterIndex = i + 1
6961}
7062
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+
7180/**
7281 * Parse a directive string into an Array of AST-like
7382 * objects representing directives.
You can’t perform that action at this time.
0 commit comments