From 033d295ef90e7fed53433cbaade995ecfff471be Mon Sep 17 00:00:00 2001 From: MichaelWest22 Date: Thu, 3 Oct 2024 17:05:40 +1300 Subject: [PATCH] fix es6 tsc checks complaining on newer s regex flag (#2938) --- src/htmx.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/htmx.js b/src/htmx.js index 1498c661..f949da04 100644 --- a/src/htmx.js +++ b/src/htmx.js @@ -583,7 +583,7 @@ var htmx = (function() { */ function makeFragment(response) { // strip head tag to determine shape of response we are dealing with - const responseWithNoHead = response.replace(/]*)?>.*?<\/head>/is, '') + const responseWithNoHead = response.replace(/]*)?>[\s\S]*?<\/head>/i, '') const startTag = getStartTag(responseWithNoHead) /** @type DocumentFragmentWithTitle */ let fragment