mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-01-18 22:36:14 +08:00
fix regex
This commit is contained in:
parent
23fbe99a5e
commit
b4bb05794a
@ -43,7 +43,7 @@ export default new Node<HeadingOptions>()
|
||||
}))
|
||||
.inputRules(({ options, type }) => {
|
||||
return options.levels.map((level: Level) => {
|
||||
return textblockTypeInputRule(new RegExp(`^(?:#){${level}}\s$/gm`), type, { level })
|
||||
return textblockTypeInputRule(new RegExp(`^(#{1,${level}})\\s$`), type, { level })
|
||||
})
|
||||
})
|
||||
.create()
|
||||
|
Loading…
Reference in New Issue
Block a user