import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; import marked from 'marked'; const renderer = new marked.Renderer(); // Set link target to `_parent` to work properly in an embed. renderer.link = (href, title, text) => `${text}`; marked.setOptions({renderer}); export default class Markdown extends PureComponent { render() { const {content, ...rest} = this.props; const __html = marked(content); return
; } } Markdown.propTypes = { content: PropTypes.string, };