replace all scramtags not just some

This commit is contained in:
velzie 2024-09-02 14:44:29 -04:00
parent 5d71685997
commit 3af7c2d9fa
No known key found for this signature in database
GPG key ID: 048413F95F0DDE1F

View file

@ -48,10 +48,8 @@ export default function (client: ScramjetClient, self: Self) {
.substring(scramtagstart + scramtag_ident.length, scramtagend) .substring(scramtagstart + scramtag_ident.length, scramtagend)
.split(" ")[1]; .split(" ")[1];
// delete the scramtag now that we're done with it // delete all scramtags inside the function (and nested ones!!)
stringified = stringified = stringified.replace(/\/\*scramtag.*?\*\//g, "");
stringified.slice(0, scramtagstart) +
stringified.slice(scramtagend + 2);
const maps = sourcemaps[tag]; const maps = sourcemaps[tag];