Skip to content
This repository was archived by the owner on Jan 20, 2022. It is now read-only.

Commit 0f36464

Browse files
authored
fix: update close_regex of block menu (#576)
1 parent 1ed9ae3 commit 0f36464

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/plugins/BlockMenuTrigger.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Extension from "../lib/Extension";
1010

1111
const MAX_MATCH = 500;
1212
const OPEN_REGEX = /^\/(\w+)?$/;
13-
const CLOSE_REGEX = /(^(?!\/(\w+)?)(.*)$|^\/((\w+)\s.*|\s)$)/;
13+
const CLOSE_REGEX = /(^(?!\/(\w+)?)(.*)$|^\/(([\w\W]+)\s.*|\s)$|^\/((\W)+)$)/;
1414

1515
// based on the input rules code in Prosemirror, here:
1616
// https://github.com/ProseMirror/prosemirror-inputrules/blob/master/src/inputrules.js

0 commit comments

Comments
 (0)