Merge branch 'master' into ft/oas3

This commit is contained in:
Kyle Shockey
2017-07-04 23:50:00 -07:00
79 changed files with 1088 additions and 599 deletions

View File

@@ -1,9 +1,16 @@
import React, { PropTypes } from "react"
import React from "react"
import PropTypes from "prop-types"
import Remarkable from "react-remarkable"
import sanitize from "sanitize-html"
function Markdown({ source }) {
const sanitized = sanitizer(source)
// 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}