@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/source.js CHANGED
@@ -580,7 +580,7 @@ function fenceParts(raw) {
580
580
  const closed = rest.length > 0 && new FenceReader(opener, { nesting: false }).feed(rest[rest.length - 1]);
581
581
  if (!closed) return { opener, body: rest.join("\n"), closed };
582
582
  const last = rest[rest.length - 1];
583
- const before = trimFenceLine(last).startsWith("```") ? "" : last.slice(0, last.indexOf("```"));
583
+ const before = opener.char === "~" || trimFenceLine(last).startsWith("```") ? "" : last.slice(0, last.indexOf("```"));
584
584
  return { opener, body: [...rest.slice(0, -1), ...before.trim() ? [before] : []].join("\n"), closed };
585
585
  }
586
586
  function fenceLineKinds(text) {