refactoring

This commit is contained in:
Philipp Kühn
2020-10-30 16:06:30 +01:00
parent b99cdcdb6f
commit 62149cc5b2
3 changed files with 10 additions and 3 deletions

View File

@@ -1,6 +1,8 @@
import { Command, createNode } from '@tiptap/core'
import { wrappingInputRule } from 'prosemirror-inputrules'
export const inputRegex = /^\s*([-+*])\s$/
const BulletList = createNode({
name: 'bullet_list',
@@ -36,7 +38,7 @@ const BulletList = createNode({
addInputRules() {
return [
wrappingInputRule(/^\s*([-+*])\s$/, this.type),
wrappingInputRule(inputRegex, this.type),
]
},
})