Merge branch 'master' into ft/sourcemaps
This commit is contained in:
@@ -31,6 +31,7 @@ export default Markdown
|
|||||||
const sanitizeOptions = {
|
const sanitizeOptions = {
|
||||||
allowedTags: sanitize.defaults.allowedTags.concat([ "h1", "h2", "img" ]),
|
allowedTags: sanitize.defaults.allowedTags.concat([ "h1", "h2", "img" ]),
|
||||||
allowedAttributes: {
|
allowedAttributes: {
|
||||||
|
...sanitize.defaults.allowedAttributes,
|
||||||
"img": sanitize.defaults.allowedAttributes.img.concat(["title"])
|
"img": sanitize.defaults.allowedAttributes.img.concat(["title"])
|
||||||
},
|
},
|
||||||
textFilter: function(text) {
|
textFilter: function(text) {
|
||||||
|
|||||||
@@ -768,14 +768,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.renderedMarkdown {
|
|
||||||
p {
|
|
||||||
@include text_body();
|
|
||||||
margin-top: 0px;
|
|
||||||
margin-bottom: 0px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.response-content-type {
|
.response-content-type {
|
||||||
padding-top: 1em;
|
padding-top: 1em;
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,12 @@ describe("Markdown component", function() {
|
|||||||
const el = render(<Markdown source={str} />)
|
const el = render(<Markdown source={str} />)
|
||||||
expect(el.html()).toEqual(`<div class="markdown"><h1>h1</h1>\n<h2>h2</h2>\n<h3>h3</h3>\n<h4>h4</h4>\n<h5>h5</h5>\n<h6>h6</h6>\n</div>`)
|
expect(el.html()).toEqual(`<div class="markdown"><h1>h1</h1>\n<h2>h2</h2>\n<h3>h3</h3>\n<h4>h4</h4>\n<h5>h5</h5>\n<h6>h6</h6>\n</div>`)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it("allows links", function() {
|
||||||
|
const str = `[Link](https://example.com/)`
|
||||||
|
const el = render(<Markdown source={str} />)
|
||||||
|
expect(el.html()).toEqual(`<div class="markdown"><p><a href="https://example.com/" target="_blank">Link</a></p>\n</div>`)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe("OAS 3", function() {
|
describe("OAS 3", function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user