makes final tweaks to markdown #897

Merged
jessopb merged 1 commit from markdownFeb4 into master 2019-02-06 08:58:58 +01:00
2 changed files with 3 additions and 1 deletions

View file

@ -1,5 +1,6 @@
import React from 'react'; import React from 'react';
import ReactMarkdown from 'react-markdown'; import ReactMarkdown from 'react-markdown';
// TODO: get markdown settings from siteConfig
class FileViewer extends React.Component { class FileViewer extends React.Component {

View file

@ -22,6 +22,7 @@ class AssetInfo extends React.Component {
const canonicalUrl = createCanonicalLink({ asset: { ...claimData, shortId: asset.shortId }}); const canonicalUrl = createCanonicalLink({ asset: { ...claimData, shortId: asset.shortId }});
const assetCanonicalUrl = `${host}${canonicalUrl}`; const assetCanonicalUrl = `${host}${canonicalUrl}`;
// Todo Issue #882 centralize all this media type detection // Todo Issue #882 centralize all this media type detection
// Todo get markdown settings from siteConfig
const embedable = contentType.split('/')[0] === 'image' || contentType === 'video/mp4'; const embedable = contentType.split('/')[0] === 'image' || contentType === 'video/mp4';
let channelCanonicalUrl; let channelCanonicalUrl;
@ -37,7 +38,7 @@ class AssetInfo extends React.Component {
{ description && ( { description && (
<RowLabeled <RowLabeled
label={<Label value={'Description'} />} label={<Label value={'Description'} />}
content={<div className='asset-info__description'><ReactMarkdown className={'markdown-preview'} source={description} /></div>} content={<div className='asset-info__description'><ReactMarkdown className={'markdown-preview'} skipHtml disallowedTypes={['image']} source={description} /></div>}
/> />
)} )}
{editable && ( {editable && (