resolve all configs

This commit is contained in:
Philipp Kühn
2020-09-09 18:07:17 +02:00
parent 9a1f99ba4c
commit 2ff134274e
5 changed files with 140 additions and 127 deletions

View File

@@ -26,35 +26,35 @@ export default new Mark()
.keys(({ editor }) => ({
'Mod-i': () => editor.italic()
}))
// .inputRules(({ type }) => {
// return ['*', '_'].map(character => {
// const regex = VerEx()
// .add('(?:^|\\s)')
// .beginCapture()
// .find(character)
// .beginCapture()
// .somethingBut(character)
// .endCapture()
// .find(character)
// .endCapture()
// .endOfLine()
.inputRules(({ type }) => {
return ['*', '_'].map(character => {
const regex = VerEx()
.add('(?:^|\\s)')
.beginCapture()
.find(character)
.beginCapture()
.somethingBut(character)
.endCapture()
.find(character)
.endCapture()
.endOfLine()
// return markInputRule(regex, type)
// })
// })
// .pasteRules(({ type }) => {
// return ['*', '_'].map(character => {
// const regex = VerEx()
// .add('(?:^|\\s)')
// .beginCapture()
// .find(character)
// .beginCapture()
// .somethingBut(character)
// .endCapture()
// .find(character)
// .endCapture()
return markInputRule(regex, type)
})
})
.pasteRules(({ type }) => {
return ['*', '_'].map(character => {
const regex = VerEx()
.add('(?:^|\\s)')
.beginCapture()
.find(character)
.beginCapture()
.somethingBut(character)
.endCapture()
.find(character)
.endCapture()
// return markPasteRule(regex, type)
// })
// })
return markPasteRule(regex, type)
})
})
.create()