bun-plugin-stx 0.2.333 → 0.2.335
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/serve.js +3 -2
- package/package.json +3 -3
package/dist/serve.js
CHANGED
|
@@ -10821,8 +10821,9 @@ ${block}`;
|
|
|
10821
10821
|
let mainContentEnd = -1;
|
|
10822
10822
|
const headStyles = [];
|
|
10823
10823
|
const headMatch = content.match(/<head\b[^>]*>([\s\S]*?)<\/head>/i);
|
|
10824
|
+
const withoutScripts = (html) => html.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi, "");
|
|
10824
10825
|
if (headMatch) {
|
|
10825
|
-
const headContent = headMatch[1];
|
|
10826
|
+
const headContent = withoutScripts(headMatch[1]);
|
|
10826
10827
|
let styleMatch;
|
|
10827
10828
|
const styleRe = /<style\b[^>]*>[\s\S]*?<\/style>/gi;
|
|
10828
10829
|
while ((styleMatch = styleRe.exec(headContent)) !== null) {
|
|
@@ -10858,7 +10859,7 @@ ${block}`;
|
|
|
10858
10859
|
if (bodyMatch) {
|
|
10859
10860
|
const bodyStart = bodyMatch.index + bodyMatch[0].length;
|
|
10860
10861
|
const mainIdx = mainOpenMatch.index;
|
|
10861
|
-
const beforeMain = content.slice(bodyStart, mainIdx);
|
|
10862
|
+
const beforeMain = withoutScripts(content.slice(bodyStart, mainIdx));
|
|
10862
10863
|
let bodyStyleMatch;
|
|
10863
10864
|
const bodyStyleRe = /<style\b[^>]*>[\s\S]*?<\/style>/gi;
|
|
10864
10865
|
while ((bodyStyleMatch = bodyStyleRe.exec(beforeMain)) !== null) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bun-plugin-stx",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.335",
|
|
5
5
|
"description": "A Bun plugin that allows for using Laravel Blade-like syntax.",
|
|
6
6
|
"author": "Chris Breuer <chris@stacksjs.org>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"typecheck": "bun tsc --noEmit"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@stacksjs/stx": "0.2.
|
|
78
|
-
"stx-router": "0.2.
|
|
77
|
+
"@stacksjs/stx": "0.2.335",
|
|
78
|
+
"stx-router": "0.2.335"
|
|
79
79
|
}
|
|
80
80
|
}
|