@ai-matrx/content-ir 0.24.6 → 0.24.7

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/surfaces.js CHANGED
@@ -343,7 +343,7 @@ function fenceParts(raw) {
343
343
  const closed = rest.length > 0 && new FenceReader(opener, { nesting: false }).feed(rest[rest.length - 1]);
344
344
  if (!closed) return { opener, body: rest.join("\n"), closed };
345
345
  const last = rest[rest.length - 1];
346
- const before = trimFenceLine(last).startsWith("```") ? "" : last.slice(0, last.indexOf("```"));
346
+ const before = opener.char === "~" || trimFenceLine(last).startsWith("```") ? "" : last.slice(0, last.indexOf("```"));
347
347
  return { opener, body: [...rest.slice(0, -1), ...before.trim() ? [before] : []].join("\n"), closed };
348
348
  }
349
349