@ai-matrx/content-ir 0.19.6 → 0.19.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/CHANGELOG.md +5 -0
- package/dist/index.cjs +5 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -8
- package/dist/index.js.map +1 -1
- package/dist/source.cjs +5 -8
- package/dist/source.cjs.map +1 -1
- package/dist/source.d.cts +3 -1
- package/dist/source.d.ts +3 -1
- package/dist/source.js +5 -8
- package/dist/source.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5288,6 +5288,7 @@ function parseFenceOpener(line) {
|
|
|
5288
5288
|
let ticks = 0;
|
|
5289
5289
|
while (start + ticks < end && line[start + ticks] === "`") ticks++;
|
|
5290
5290
|
if (ticks < 3) return null;
|
|
5291
|
+
if (line.slice(start + ticks, end).includes("`")) return null;
|
|
5291
5292
|
let infoStart = start + ticks;
|
|
5292
5293
|
while (infoStart < end && isOpenerWhitespace(line[infoStart])) infoStart++;
|
|
5293
5294
|
let langEnd = infoStart;
|
|
@@ -5312,9 +5313,9 @@ function classifyInnerFenceLine(trimmed, openTicks, nests, nestedDepth) {
|
|
|
5312
5313
|
function fenceOpenerOf(content) {
|
|
5313
5314
|
const t = content.trimStart();
|
|
5314
5315
|
if (t.startsWith("```")) {
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
return { char: "`", ticks, lang:
|
|
5316
|
+
const parsed = parseFenceOpener(t);
|
|
5317
|
+
if (!parsed) return null;
|
|
5318
|
+
return { char: "`", ticks: parsed.ticks, lang: parsed.lang };
|
|
5318
5319
|
}
|
|
5319
5320
|
if (content.length - t.length <= 3 && t.startsWith("~~~")) {
|
|
5320
5321
|
const open = /^(~{3,})(.*)$/.exec(t);
|
|
@@ -5324,11 +5325,7 @@ function fenceOpenerOf(content) {
|
|
|
5324
5325
|
return null;
|
|
5325
5326
|
}
|
|
5326
5327
|
function opensStrictFence(line) {
|
|
5327
|
-
|
|
5328
|
-
if (!opener) return false;
|
|
5329
|
-
if (opener.char === "~") return true;
|
|
5330
|
-
const t = line.trimStart();
|
|
5331
|
-
return !t.slice(opener.ticks).includes("`");
|
|
5328
|
+
return fenceOpenerOf(line) !== null;
|
|
5332
5329
|
}
|
|
5333
5330
|
var FenceReader = class {
|
|
5334
5331
|
opener;
|