Skip to content

Commit

Permalink
attempt fix parsing errors in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
grantcopley committed Sep 29, 2024
1 parent da67a61 commit 1b0658b
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions models/preprocessor/TemplatePreprocessor.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,12 @@ component {
* @return string
*/
function parseScripts( content, counter = 1 ) {
if ( counter == 1 ) {
content = replaceNoCase( content, "</cbwire:script>", "</" & "cf" & "savecontent>", "all" );
}
content = replaceNoCase( content, "<cbwire:script>", "<" & "cf" & "savecontent variable=""attributes.returnValues.script#counter#"">", "one" );
if ( findNoCase( "<cbwire:script>", content ) ) {
content = parseScripts( content, counter + 1 );
arguments.content = replaceNoCase( arguments.content, "</cbwire:script>", "</" & "cf" & "savecontent>", "one" );
arguments.content = replaceNoCase( arguments.content, "<cbwire:script>", "<" & "cf" & "savecontent variable=""attributes.returnValues.script#counter#"">", "one" );
if ( findNoCase( "<cbwire:script>", arguments.content ) ) {
arguments.content = parseScripts( arguments.content, arguments.counter + 1 );
}
return content;
return arguments.content;
}

/**
Expand Down

0 comments on commit 1b0658b

Please sign in to comment.