mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 11:47:56 +01:00
Add markdown support (#115)
This commit is contained in:
committed by
GitHub
parent
78049a820c
commit
35c427d9f6
@@ -1,4 +1,5 @@
|
||||
import * as React from 'react';
|
||||
import ReactMarkdown from 'react-markdown';
|
||||
import I18n from 'i18n-js';
|
||||
|
||||
import IPost from '../../interfaces/IPost';
|
||||
@@ -172,7 +173,15 @@ class PostP extends React.Component<Props> {
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
<p className="postDescription">{post.description}</p>
|
||||
|
||||
<ReactMarkdown
|
||||
className="postDescription"
|
||||
disallowedTypes={['heading', 'image', 'html']}
|
||||
unwrapDisallowed
|
||||
>
|
||||
{post.description}
|
||||
</ReactMarkdown>
|
||||
|
||||
<MutedText>{friendlyDate(post.createdAt)}</MutedText>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user