Skip to content

Commit

Permalink
Update Sanitiser.php
Browse files Browse the repository at this point in the history
  • Loading branch information
convenient authored Feb 9, 2024
1 parent d955f8d commit db9743a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Ampersand/PatchHelper/Patchfile/Sanitiser.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ public static function stripCommentsFromHtml($contents)
{
// This regular expression will match and remove both single-line <!-- ... --> comments and multi-line comments
// spanning multiple lines. The s flag is used to make the dot (.) match any character, including newlines.
// This does not include knockout templates, as logic is embedded in comments
return preg_replace('/<!--(?! *ko)(.*?)-->/s', '', $contents);
}
}

0 comments on commit db9743a

Please sign in to comment.