@ai-matrx/content-ir 0.16.0 → 0.16.1

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/index.js CHANGED
@@ -5891,7 +5891,8 @@ var Tokenizer = class {
5891
5891
  const fm = this.frontMatter(li, t);
5892
5892
  if (fm) return fm;
5893
5893
  }
5894
- if (indent <= 3 && t.startsWith("::")) {
5894
+ const listNested = indent > 0 && this.inListContinuation(li);
5895
+ if (indent <= 3 && !listNested && t.startsWith("::")) {
5895
5896
  const directive = this.directive(p, li, t);
5896
5897
  if (directive) return directive;
5897
5898
  }
@@ -5899,7 +5900,7 @@ var Tokenizer = class {
5899
5900
  const admonition = this.mkdocsAdmonition(p, li, t);
5900
5901
  if (admonition) return admonition;
5901
5902
  }
5902
- if (indent <= 3 && t.startsWith(">")) {
5903
+ if (indent <= 3 && !listNested && t.startsWith(">")) {
5903
5904
  const callout = this.callout(p, li, t);
5904
5905
  if (callout) return callout;
5905
5906
  }
@@ -5940,6 +5941,17 @@ var Tokenizer = class {
5940
5941
  }
5941
5942
  return null;
5942
5943
  }
5944
+ /** True when line `li` continues a list item (the nearest non-blank line above is a list item or indented text under one). */
5945
+ inListContinuation(li) {
5946
+ for (let k = li - 1; k >= 0; k--) {
5947
+ const line = this.lineText(k);
5948
+ if (!NOT_WHITESPACE.test(line)) continue;
5949
+ if (/^[ \t]*(?:[-*+]|\d{1,9}[.)])[ \t]/.test(line)) return true;
5950
+ if (/^[ \t]/.test(line)) continue;
5951
+ return false;
5952
+ }
5953
+ return false;
5954
+ }
5943
5955
  island(type, start, end, complete, meta = {}) {
5944
5956
  return { type, start, end, complete, meta };
5945
5957
  }