Skip to content

Commit

Permalink
modified isMatch to permit multiple links to be pasted without trigge…
Browse files Browse the repository at this point in the history
…ring embed block(WordPress#27551)
  • Loading branch information
gaavar committed Jan 4, 2021
1 parent 473fd2e commit 61ea2df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/block-library/src/embed/transforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const transforms = {
isMatch: ( node ) =>
node.nodeName === 'P' &&
/^\s*(https?:\/\/\S+)\s*$/i.test( node.textContent ) &&
node.textContent?.match( `/https/gi` ).length === 1,
node.textContent?.match( /https/gi ).length === 1,
transform: ( node ) => {
return createBlock( EMBED_BLOCK, {
url: node.textContent.trim(),
Expand Down

0 comments on commit 61ea2df

Please sign in to comment.