Fix style error
This commit is contained in:
@@ -1,11 +1,17 @@
|
||||
import React from "react"
|
||||
import React, { PropTypes } from "react"
|
||||
import Remarkable from "react-remarkable"
|
||||
import sanitize from "sanitize-html"
|
||||
|
||||
export default function Markdown({ source }) {
|
||||
function Markdown({ source }) {
|
||||
const sanitized = sanitize(source)
|
||||
return <Remarkable
|
||||
options={{html: true, typographer: true, linkify: true, linkTarget: "_blank"}}
|
||||
source={sanitized}
|
||||
></Remarkable>
|
||||
}
|
||||
|
||||
Markdown.propTypes = {
|
||||
source: PropTypes.string.isRequired
|
||||
}
|
||||
|
||||
export default Markdown
|
||||
|
||||
Reference in New Issue
Block a user