@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.js CHANGED
@@ -748,9 +748,9 @@ function createMarkdownBehaviors(config) {
748
748
  listItemLength: 1,
749
749
  style: defaultStyle
750
750
  };
751
- const looksLikeOrderedList = /^1./.test(focusSpan.node.text), orderedListStyle = config.orderedListStyle?.({
751
+ const looksLikeOrderedList = /^1\./.test(blockText), orderedListStyle = config.orderedListStyle?.({
752
752
  schema: context.schema
753
- }), caretAtTheEndOfOrderedList = context.selection.focus.offset === 2;
753
+ }), caretAtTheEndOfOrderedList = blockOffset.offset === 2;
754
754
  return defaultStyle && caretAtTheEndOfOrderedList && looksLikeOrderedList && orderedListStyle !== void 0 ? {
755
755
  focusTextBlock,
756
756
  listItem: orderedListStyle,