File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -216,11 +216,15 @@ function checkFile(filePath) {
216216 cfIncludeMatches . concat ( includeMatches ) . forEach ( function ( includeMatch ) {
217217 // console.log(includeMatch);
218218
219- // Dynamic path (contains #): all we can check is the non-dynamic part
219+ // Dynamic path (contains # or &): all we can check is the non-dynamic part,
220+ // wound back to the last slash
220221 var templatePath = includeMatch [ 1 ] ;
221222 var hashPos = templatePath . indexOf ( '#' ) ;
222- if ( hashPos !== - 1 ) {
223- templatePath = path . dirname ( templatePath . substr ( 0 , hashPos ) ) ;
223+ var ampersandPos = templatePath . indexOf ( '&' ) ;
224+ if ( hashPos !== - 1 || ampersandPos !== - 1 ) {
225+ var searchPos = hashPos !== - 1 ? hashPos : ampersandPos ;
226+ var lastSlashPos = templatePath . lastIndexOf ( '/' , searchPos ) ;
227+ templatePath = path . dirname ( templatePath . substr ( 0 , lastSlashPos ) ) ;
224228 }
225229
226230 // Can't work with webroot-virtual paths, e.g. /missing.cfm
You can’t perform that action at this time.
0 commit comments