@ai-markdown/core 3.0.2 → 3.2.0

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.cjs CHANGED
@@ -266,10 +266,12 @@ function buildBlocks(mdast, hast, source, options = {}) {
266
266
  continue;
267
267
  }
268
268
  let hastDigest;
269
+ let swallowedSource;
269
270
  let swallowedTaint = false;
270
271
  if (isRawHtmlBlock) {
271
272
  const d = computeHtmlBlockDigestWithExtent(el, source, mdastPos.end.offset);
272
273
  hastDigest = d.digest;
274
+ swallowedSource = source.slice(mdastPos.end.offset, d.maxEnd);
273
275
  const first = firstTaintAtOrAfter(mdastPos.end.offset);
274
276
  swallowedTaint = first < taintOffsets.length && taintOffsets[first] < d.maxEnd;
275
277
  }
@@ -282,6 +284,7 @@ function buildBlocks(mdast, hast, source, options = {}) {
282
284
  startColumn: mdastPos.start.column,
283
285
  hasReference,
284
286
  ...hastDigest !== void 0 ? { hastDigest } : {},
287
+ ...swallowedSource !== void 0 ? { swallowedSource } : {},
285
288
  ...swallowed?.hasFootnoteSection ? { containsFootnoteSection: true } : {},
286
289
  ...hasReference ? {
287
290
  taintLabels: {
@@ -856,6 +859,9 @@ function createPipelineSession() {
856
859
  provenance,
857
860
  incrementalParse,
858
861
  defListEnabled,
862
+ gfmTaskListItems = false,
863
+ // No default: omitted is its own (undeclared) state at the engine.
864
+ mathFlow,
859
865
  measure: measureHere = unmeasured
860
866
  }) {
861
867
  const phantomDefs = (0, import_engine4.buildPhantomSuffix)(targetPhantoms);
@@ -933,9 +939,13 @@ function createPipelineSession() {
933
939
  // already refuses to resume under a different profile, but the
934
940
  // retained TREES were still spliced against — a prefix frozen
935
941
  // under one profile must not survive into frames under the other.
936
- defListEnabled
942
+ defListEnabled,
943
+ gfmTaskListItems,
944
+ mathFlow
937
945
  ],
938
946
  defListEnabled,
947
+ gfmTaskListItems,
948
+ mathFlow,
939
949
  phantomSuffix,
940
950
  measure: measureHere
941
951
  });