From 8849953b50c54db69ca078a85a5f614892c22f98 Mon Sep 17 00:00:00 2001 From: Damien Duhamel Date: Thu, 21 Dec 2017 20:35:30 +0100 Subject: [PATCH] fix image form not displaying when added as first item in markdown widget --- src/components/MarkdownPlugins/image.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/MarkdownPlugins/image.js b/src/components/MarkdownPlugins/image.js index 4739b7a6..55cd3753 100644 --- a/src/components/MarkdownPlugins/image.js +++ b/src/components/MarkdownPlugins/image.js @@ -8,8 +8,8 @@ const image = { alt: match[1], }, toBlock: data => `![${ data.alt || '' }](${ data.image || '' })`, - toPreview: (data, getAsset) => {data.alt, - pattern: /^!\[([^\]]+)]\(([^)]+)\)$/, + toPreview: (data, getAsset) => {data.alt, + pattern: /^!\[(.*)\]\((.*)\)$/, fields: [{ label: 'Image', name: 'image',