Skip to content

Commit

Permalink
fix image form not displaying when added as first item in markdown wi…
Browse files Browse the repository at this point in the history
…dget
  • Loading branch information
Dammmien authored and erquhart committed Dec 21, 2017
1 parent a1b947a commit 8849953
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/MarkdownPlugins/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ const image = {
alt: match[1],
},
toBlock: data => `![${ data.alt || '' }](${ data.image || '' })`,
toPreview: (data, getAsset) => <img src={getAsset(data.image || '')} alt={data.alt || ''} />,
pattern: /^!\[([^\]]+)]\(([^)]+)\)$/,
toPreview: (data, getAsset) => <img src={getAsset(data.image) || ''} alt={data.alt || ''} />,
pattern: /^!\[(.*)\]\((.*)\)$/,
fields: [{
label: 'Image',
name: 'image',
Expand Down

0 comments on commit 8849953

Please sign in to comment.