Fixes swagger-editor/#1502.

Change logic for markdown rendering to:

1. Convert source markdown to HTML
2. Sanitize HTML
3. Send sanitized HTML to markdown renderer
This commit is contained in:
Owen Conti
2017-09-27 18:05:12 -06:00
parent 774a06606d
commit 590819ad9b
4 changed files with 45 additions and 25 deletions

View File

@@ -111,7 +111,7 @@ export default class Response extends React.Component {
if(examples) {
examples = examples.map(example => {
// Remove unwanted properties from examples
return example.set("$$ref", undefined)
return example.set ? example.set("$$ref", undefined) : example
})
}