Skip to content

Commit

Permalink
fix: update close_regex of block menu (outline#576)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamsaumya authored Nov 26, 2021
1 parent 1ed9ae3 commit 0f36464
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/BlockMenuTrigger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Extension from "../lib/Extension";

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

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

0 comments on commit 0f36464

Please sign in to comment.