@incremark/core 0.3.6 → 0.3.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/dist/index.js CHANGED
@@ -415,6 +415,9 @@ var NewBlockBoundaryChecker = class {
415
415
  if (isSetextHeadingUnderline(line, prevLine)) {
416
416
  return lineIndex - 1;
417
417
  }
418
+ if (context.inList) {
419
+ return -1;
420
+ }
418
421
  if (isHeading(line)) {
419
422
  return lineIndex - 1;
420
423
  }
@@ -424,7 +427,7 @@ var NewBlockBoundaryChecker = class {
424
427
  if (isBlockquoteStart(line) && !isBlockquoteStart(prevLine)) {
425
428
  return lineIndex - 1;
426
429
  }
427
- if (!context.inList && isListItemStart(line) && !isListItemStart(prevLine)) {
430
+ if (isListItemStart(line) && !isListItemStart(prevLine)) {
428
431
  return lineIndex - 1;
429
432
  }
430
433
  return -1;
@@ -484,12 +487,13 @@ var BoundaryDetector = class {
484
487
  const wasInFencedCode = tempContext.inFencedCode;
485
488
  const wasInContainer = tempContext.inContainer;
486
489
  const wasContainerDepth = tempContext.containerDepth;
490
+ const wasInList = tempContext.inList;
487
491
  const prevLine = i > 0 ? lines[i - 1] : "";
488
492
  const isSetextUnderline = i > 0 && isSetextHeadingUnderline(line, prevLine);
489
493
  const hasExplicitBlockBoundary = detectFenceStart(line) || // 代码块 fence 开始
490
494
  isHeading(line) || // 新标题开始
491
495
  isThematicBreak(line);
492
- if (!wasInFencedCode && !wasInContainer && hasExplicitBlockBoundary && !isSetextUnderline) {
496
+ if (!wasInFencedCode && !wasInContainer && !wasInList && hasExplicitBlockBoundary && !isSetextUnderline) {
493
497
  stableLine = i - 1;
494
498
  stableContext = { ...tempContext };
495
499
  }