@mralfarrakhan/svork 0.6.1 → 0.6.2
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/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2312,7 +2312,7 @@ const maskMarkdownCodeForSvelteParse = (source) => {
|
|
|
2312
2312
|
};
|
|
2313
2313
|
const escapeSvelteTextBraces = (value) => value.replace(/\{/g, "{").replace(/\}/g, "}");
|
|
2314
2314
|
const escapeRawNodeBraces = (html) => {
|
|
2315
|
-
return html.split(/(<(?:script|style)\b[\s\S]*?<\/(?:script|style)\s*>)/gi).map((part, i) => i % 2 === 1 ? part : escapeSvelteTextBraces(part)).join("");
|
|
2315
|
+
return html.replace(/"([^"]*)"/g, (match, val) => val.includes("<") ? `"${val.replace(/</g, "<").replace(/>/g, ">")}"` : match).split(/(<(?:script|style)\b[\s\S]*?<\/(?:script|style)\s*>)/gi).map((part, i) => i % 2 === 1 ? part : escapeSvelteTextBraces(part)).join("");
|
|
2316
2316
|
};
|
|
2317
2317
|
function escapeBracesPlugin() {
|
|
2318
2318
|
return (tree) => {
|
package/package.json
CHANGED