fix type issue

This commit is contained in:
Philipp Kühn
2020-09-09 12:57:50 +02:00
parent 22109170b3
commit f56fae49a1
6 changed files with 38 additions and 61 deletions

View File

@@ -34,22 +34,23 @@ export default new Mark()
.keys(({ editor }) => ({
'Mod-b': () => editor.bold()
}))
// .inputRules(({ type }) => {
// return ['**', '__'].map(character => {
// const regex = VerEx()
// .add('(?:^|\\s)')
// .beginCapture()
// .find(character)
// .beginCapture()
// .somethingBut(character)
// .endCapture()
// .find(character)
// .endCapture()
// .endOfLine()
.inputRules(({ type }) => {
console.log(type)
return ['**', '__'].map(character => {
const regex = VerEx()
.add('(?:^|\\s)')
.beginCapture()
.find(character)
.beginCapture()
.somethingBut(character)
.endCapture()
.find(character)
.endCapture()
.endOfLine()
// return markInputRule(regex, type)
// })
// })
return markInputRule(regex, type)
})
})
// .pasteRules(({ type }) => {
// return ['**', '__'].map(character => {
// const regex = VerEx()