refactoring

This commit is contained in:
Philipp Kühn 2020-04-12 23:47:24 +02:00
parent 56beb707ab
commit f29b39238b

View File

@ -39,38 +39,34 @@ export default class Code extends Mark {
}
inputRules() {
return [
markInputRule(
VerEx()
.add('(?:^|\\s)')
.beginCapture()
.find('`')
.beginCapture()
.somethingBut('`')
.endCapture()
.find('`')
.endCapture()
.endOfLine(),
this.type,
)
]
return markInputRule(
VerEx()
.add('(?:^|\\s)')
.beginCapture()
.find('`')
.beginCapture()
.somethingBut('`')
.endCapture()
.find('`')
.endCapture()
.endOfLine(),
this.type,
)
}
pasteRules() {
return [
markPasteRule(
VerEx()
.add('(?:^|\\s)')
.beginCapture()
.find('`')
.beginCapture()
.somethingBut('`')
.endCapture()
.find('`')
.endCapture(),
this.type,
)
]
return markPasteRule(
VerEx()
.add('(?:^|\\s)')
.beginCapture()
.find('`')
.beginCapture()
.somethingBut('`')
.endCapture()
.find('`')
.endCapture(),
this.type,
)
}
}