fix es6 tsc checks complaining on newer s regex flag (#2938)

This commit is contained in:
MichaelWest22
2024-10-03 17:05:40 +13:00
committed by GitHub
parent 56f801f69d
commit 033d295ef9

View File

@@ -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(\s[^>]*)?>.*?<\/head>/is, '')
const responseWithNoHead = response.replace(/<head(\s[^>]*)?>[\s\S]*?<\/head>/i, '')
const startTag = getStartTag(responseWithNoHead)
/** @type DocumentFragmentWithTitle */
let fragment