@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@portabletext/editor",
3
- "version": "1.12.1",
3
+ "version": "1.12.2",
4
4
  "description": "Portable Text Editor made in React",
5
5
  "keywords": [
6
6
  "sanity",
@@ -418,11 +418,11 @@ export function createMarkdownBehaviors(config: MarkdownBehaviorsConfig) {
418
418
  }
419
419
  }
420
420
 
421
- const looksLikeOrderedList = /^1./.test(focusSpan.node.text)
421
+ const looksLikeOrderedList = /^1\./.test(blockText)
422
422
  const orderedListStyle = config.orderedListStyle?.({
423
423
  schema: context.schema,
424
424
  })
425
- const caretAtTheEndOfOrderedList = context.selection.focus.offset === 2
425
+ const caretAtTheEndOfOrderedList = blockOffset.offset === 2
426
426
 
427
427
  if (
428
428
  defaultStyle &&