@ai-matrx/content-ir 0.24.6 → 0.24.8

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