refactoring
This commit is contained in:
@@ -39,38 +39,34 @@ export default class Code extends Mark {
|
|||||||
}
|
}
|
||||||
|
|
||||||
inputRules() {
|
inputRules() {
|
||||||
return [
|
return markInputRule(
|
||||||
markInputRule(
|
VerEx()
|
||||||
VerEx()
|
.add('(?:^|\\s)')
|
||||||
.add('(?:^|\\s)')
|
.beginCapture()
|
||||||
.beginCapture()
|
.find('`')
|
||||||
.find('`')
|
.beginCapture()
|
||||||
.beginCapture()
|
.somethingBut('`')
|
||||||
.somethingBut('`')
|
.endCapture()
|
||||||
.endCapture()
|
.find('`')
|
||||||
.find('`')
|
.endCapture()
|
||||||
.endCapture()
|
.endOfLine(),
|
||||||
.endOfLine(),
|
this.type,
|
||||||
this.type,
|
)
|
||||||
)
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pasteRules() {
|
pasteRules() {
|
||||||
return [
|
return markPasteRule(
|
||||||
markPasteRule(
|
VerEx()
|
||||||
VerEx()
|
.add('(?:^|\\s)')
|
||||||
.add('(?:^|\\s)')
|
.beginCapture()
|
||||||
.beginCapture()
|
.find('`')
|
||||||
.find('`')
|
.beginCapture()
|
||||||
.beginCapture()
|
.somethingBut('`')
|
||||||
.somethingBut('`')
|
.endCapture()
|
||||||
.endCapture()
|
.find('`')
|
||||||
.find('`')
|
.endCapture(),
|
||||||
.endCapture(),
|
this.type,
|
||||||
this.type,
|
)
|
||||||
)
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user