@ai-markdown/core 3.0.2 → 3.1.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.dev.js CHANGED
@@ -224,10 +224,12 @@ function buildBlocks(mdast, hast, source, options = {}) {
224
224
  continue;
225
225
  }
226
226
  let hastDigest;
227
+ let swallowedSource;
227
228
  let swallowedTaint = false;
228
229
  if (isRawHtmlBlock) {
229
230
  const d = computeHtmlBlockDigestWithExtent(el, source, mdastPos.end.offset);
230
231
  hastDigest = d.digest;
232
+ swallowedSource = source.slice(mdastPos.end.offset, d.maxEnd);
231
233
  const first = firstTaintAtOrAfter(mdastPos.end.offset);
232
234
  swallowedTaint = first < taintOffsets.length && taintOffsets[first] < d.maxEnd;
233
235
  }
@@ -240,6 +242,7 @@ function buildBlocks(mdast, hast, source, options = {}) {
240
242
  startColumn: mdastPos.start.column,
241
243
  hasReference,
242
244
  ...hastDigest !== void 0 ? { hastDigest } : {},
245
+ ...swallowedSource !== void 0 ? { swallowedSource } : {},
243
246
  ...swallowed?.hasFootnoteSection ? { containsFootnoteSection: true } : {},
244
247
  ...hasReference ? {
245
248
  taintLabels: {
@@ -821,6 +824,9 @@ function createPipelineSession() {
821
824
  provenance,
822
825
  incrementalParse,
823
826
  defListEnabled,
827
+ gfmTaskListItems = false,
828
+ // No default: omitted is its own (undeclared) state at the engine.
829
+ mathFlow,
824
830
  measure: measureHere = unmeasured
825
831
  }) {
826
832
  const phantomDefs = buildPhantomSuffix(targetPhantoms);
@@ -898,9 +904,13 @@ function createPipelineSession() {
898
904
  // already refuses to resume under a different profile, but the
899
905
  // retained TREES were still spliced against — a prefix frozen
900
906
  // under one profile must not survive into frames under the other.
901
- defListEnabled
907
+ defListEnabled,
908
+ gfmTaskListItems,
909
+ mathFlow
902
910
  ],
903
911
  defListEnabled,
912
+ gfmTaskListItems,
913
+ mathFlow,
904
914
  phantomSuffix,
905
915
  measure: measureHere
906
916
  });