@portabletext/editor 1.12.1 → 1.12.2

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/lib/index.esm.js CHANGED
@@ -769,9 +769,9 @@ function createMarkdownBehaviors(config) {
769
769
  listItemLength: 1,
770
770
  style: defaultStyle
771
771
  };
772
- const looksLikeOrderedList = /^1./.test(focusSpan.node.text), orderedListStyle = config.orderedListStyle?.({
772
+ const looksLikeOrderedList = /^1\./.test(blockText), orderedListStyle = config.orderedListStyle?.({
773
773
  schema: context.schema
774
- }), caretAtTheEndOfOrderedList = context.selection.focus.offset === 2;
774
+ }), caretAtTheEndOfOrderedList = blockOffset.offset === 2;
775
775
  return defaultStyle && caretAtTheEndOfOrderedList && looksLikeOrderedList && orderedListStyle !== void 0 ? {
776
776
  focusTextBlock,
777
777
  listItem: orderedListStyle,