@@ -10,7 +10,7 @@ const revertBackupedLocals = require('./backup').revert
1010const placeholders = require ( './placeholders' )
1111
1212const delimitersSettings = [ ]
13- let conditionals , switches , loops , scopes , ignored
13+ let conditionals , switches , loops , scopes , ignored , ignoredBefore , ignoredAfter , toReplace , ignoredNodeExpression , ignoredAttrsExpression
1414
1515/**
1616 * @description Creates a set of local variables within the loop, and evaluates all nodes within the loop, returning their contents
@@ -147,6 +147,13 @@ module.exports = function postHTMLExpressions (options) {
147147 delimitersSettings [ 0 ] = delimiters [ 1 ]
148148 delimitersSettings [ 1 ] = delimiters [ 0 ]
149149 }
150+
151+
152+ ignoredBefore = delimitersSettings [ 1 ] . text [ 0 ]
153+ ignoredAfter = delimitersSettings [ 1 ] . text [ 1 ]
154+ toReplace = new RegExp ( `@${ ignoredBefore } ` , 'g' )
155+ ignoredNodeExpression = new RegExp ( `@${ ignoredBefore } (.+?)${ ignoredAfter } ` , 'g' )
156+ ignoredAttrsExpression = new RegExp ( `.*@${ ignoredBefore } (.+?)${ ignoredAfter } ` )
150157
151158 // kick off the parsing
152159 return walk . bind ( null , { locals : options . locals } )
@@ -174,12 +181,6 @@ function walk (opts, nodes) {
174181 return m
175182 }
176183
177- const ignoredBefore = delimitersSettings [ 1 ] . text [ 0 ]
178- const ignoredAfter = delimitersSettings [ 1 ] . text [ 1 ]
179- const toReplace = new RegExp ( `@${ ignoredBefore } ` , 'g' )
180- const ignoredNodeExpression = new RegExp ( `@${ ignoredBefore } (.+?)${ ignoredAfter } ` , 'g' )
181- const ignoredAttrsExpression = new RegExp ( `.*@${ ignoredBefore } (.+?)${ ignoredAfter } ` )
182-
183184 // if we have a string, match and replace it
184185 if ( typeof node === 'string' ) {
185186 // if node contains ignored expression delimiter, output as-is
0 commit comments