@ai-matrx/content-ir 0.14.2 → 0.14.3

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.cjs CHANGED
@@ -514,6 +514,37 @@ var NOT_WHITESPACE = /\S/;
514
514
  var DIRECTIVE_OPEN = /^(:{2,})([A-Za-z][\w-]*)/;
515
515
  var MKDOCS_OPEN = /^(!!!|\?\?\?\+?)[ \t]+([A-Za-z][\w-]*)/;
516
516
  var CALLOUT_OPEN = /^>[ \t]*\[!([A-Za-z][\w-]*)\]([+-])?/;
517
+ var CALLOUT_NAMES = /* @__PURE__ */ new Set([
518
+ "note",
519
+ "seealso",
520
+ "example",
521
+ "tip",
522
+ "hint",
523
+ "important",
524
+ "warning",
525
+ "warn",
526
+ "attention",
527
+ "caution",
528
+ "danger",
529
+ "error",
530
+ "failure",
531
+ "fail",
532
+ "missing",
533
+ "bug",
534
+ "info",
535
+ "abstract",
536
+ "summary",
537
+ "tldr",
538
+ "todo",
539
+ "success",
540
+ "check",
541
+ "done",
542
+ "question",
543
+ "help",
544
+ "faq",
545
+ "quote",
546
+ "cite"
547
+ ]);
517
548
  var FOOTNOTE_DEF = /^\[\^([^\]\s]+)\]:/;
518
549
  function countStructuralBraces(source) {
519
550
  let opens = 0;
@@ -907,7 +938,7 @@ var Tokenizer = class {
907
938
  /** A blockquote whose first line is `> [!TYPE]…` — every following `>` line belongs to it. */
908
939
  callout(p, li, t) {
909
940
  const open = CALLOUT_OPEN.exec(t);
910
- if (!open) return null;
941
+ if (!open || !CALLOUT_NAMES.has(open[1].toLowerCase())) return null;
911
942
  let last = li;
912
943
  for (let k = li + 1; k < this.lineCount; k++) {
913
944
  if (!/^ {0,3}>/.test(this.lineText(k))) break;
@@ -1886,6 +1917,7 @@ function mapRange(changes, start, end, unit = "utf16") {
1886
1917
  return { start: newStart, end: newEnd, touched, collapsed: newEnd === newStart && end > start };
1887
1918
  }
1888
1919
 
1920
+ exports.CALLOUT_NAMES = CALLOUT_NAMES;
1889
1921
  exports.FENCE_WHITESPACE = FENCE_WHITESPACE;
1890
1922
  exports.NESTING_FENCE_LANGUAGES = NESTING_FENCE_LANGUAGES;
1891
1923
  exports.SourceSpliceError = SourceSpliceError;