Merge branch 'master' into feature/misuse-of-findIndex

This commit is contained in:
shockey
2017-06-22 23:25:12 -07:00
committed by GitHub
2 changed files with 43 additions and 0 deletions

View File

@@ -11,6 +11,12 @@ const sanitizeOptions = {
function Markdown({ source }) {
const sanitized = sanitize(source, sanitizeOptions)
// sometimes the sanitizer returns "undefined" as a string
if(!source || !sanitized || sanitized === "undefined") {
return null
}
return <Remarkable
options={{html: true, typographer: true, linkify: true, linkTarget: "_blank"}}
source={sanitized}