From df638598b86175634794f6aaac308cc58419b731 Mon Sep 17 00:00:00 2001 From: Shawn Erquhart Date: Thu, 21 Dec 2017 14:09:12 -0500 Subject: [PATCH] update markdown image component config --- src/components/MarkdownPlugins/image.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/MarkdownPlugins/image.js b/src/components/MarkdownPlugins/image.js index 3611cc4f3aa9..2504b09d0856 100644 --- a/src/components/MarkdownPlugins/image.js +++ b/src/components/MarkdownPlugins/image.js @@ -7,9 +7,9 @@ const image = { image: match[2], alt: match[1], }, - toBlock: data => `![${ data.alt }](${ data.image || '' })`, - toPreview: (data, getAsset) => {data.alt, - pattern: /^!\[([\S\s]*)\]\(([\S\s]*)\)$/, + toBlock: data => `![${ data.alt || '' }](${ data.image || '' })`, + toPreview: (data, getAsset) => {data.alt, + pattern: /^!\[([\S\s]*)\]\((.*)\)$/, fields: [{ label: 'Image', name: 'image',