@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.
Files changed (2) hide show
  1. package/dist/index.mjs +1 -1
  2. 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, "&lt;").replace(/>/g, "&gt;")}"` : 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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mralfarrakhan/svork",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "description": "Svelte utilities for writing blog",
6
6
  "author": "mralfarrakhan <alfarrakhan@gmail.com",
7
7
  "license": "AGPL-3.0-or-later",