Merge branch 'master' of github.com:swagger-api/swagger-ui into improvement/remove-react-addons-shallow-compare

This commit is contained in:
Sven Tschui
2017-06-24 16:14:11 +02:00
9 changed files with 63 additions and 21 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}