fix(core): force multiline flag for editor component patterns (#3082)

This commit is contained in:
Shawn Erquhart
2020-01-14 01:44:37 -05:00
committed by Erez Rokah
parent 09564bf8b6
commit 476f45096e
2 changed files with 39 additions and 38 deletions

View File

@ -25,7 +25,8 @@ export default function createEditorComponent(config) {
type,
icon,
widget,
pattern,
// enforce multiline flag, exclude others
pattern: new RegExp(pattern, 'm'),
fromBlock: bind(fromBlock) || (() => ({})),
toBlock: bind(toBlock) || (() => 'Plugin'),
toPreview: bind(toPreview) || (!widget && (bind(toBlock) || (() => 'Plugin'))),