Make compatible with Typography extension
They Typography extension automatically converts two hyphens `--` into an em dash `–`, which means typing three hyphens in a row results in an em dash and a hyphen `–-`, instead of triggering an hr. I propose adding the `–-` pattern to this `nodeInputRule` so typing three hyphens in a row will still trigger an hr, even if 'smart dashes' are enabled via the Typography extension or otherwise.
This commit is contained in:
@@ -70,7 +70,7 @@ export const HorizontalRule = Node.create<HorizontalRuleOptions>({
|
||||
|
||||
addInputRules() {
|
||||
return [
|
||||
nodeInputRule(/^(?:---|___\s|\*\*\*\s)$/, this.type),
|
||||
nodeInputRule(/^(?:---|\—-|___\s|\*\*\*\s)$/, this.type),
|
||||
]
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user