Skip to content

Commit

Permalink
fix(markdown behavior): make list toggling disregard spans
Browse files Browse the repository at this point in the history
  • Loading branch information
christianhg committed Nov 28, 2024
1 parent 4ca9114 commit 3b996bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/editor/src/editor/behavior/behavior.markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -418,11 +418,11 @@ export function createMarkdownBehaviors(config: MarkdownBehaviorsConfig) {
}
}

const looksLikeOrderedList = /^1\./.test(focusSpan.node.text)
const looksLikeOrderedList = /^1\./.test(blockText)
const orderedListStyle = config.orderedListStyle?.({
schema: context.schema,
})
const caretAtTheEndOfOrderedList = context.selection.focus.offset === 2
const caretAtTheEndOfOrderedList = blockOffset.offset === 2

if (
defaultStyle &&
Expand Down

0 comments on commit 3b996bd

Please sign in to comment.