fix regex

This commit is contained in:
Philipp Kühn 2020-09-09 20:29:50 +02:00
parent 23fbe99a5e
commit b4bb05794a

View File

@ -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()