@@ -9,7 +9,7 @@ describe("Markdown component", function () {
99 const getConfigs = ( ) => ( { useUnsafeMarkdown : true } )
1010 const str = `<span class="method" style="border-width: 1px" data-attr="value">ONE</span>`
1111 const el = render ( < Markdown source = { str } getConfigs = { getConfigs } /> )
12- expect ( el . prop ( "outerHTML" ) ) . toEqual ( `<div class="markdown"><p><span data-attr="value " style="border-width: 1px" class="method ">ONE</span></p>\n</div>` )
12+ expect ( el . prop ( "outerHTML" ) ) . toEqual ( `<div class="markdown"><p><span class="method " style="border-width: 1px" data-attr="value ">ONE</span></p>\n</div>` )
1313 } )
1414
1515 it ( "strips class, style and data-* attribs from elements" , function ( ) {
@@ -28,13 +28,13 @@ describe("Markdown component", function () {
2828 it ( "allows image elements" , function ( ) {
2929 const str = ``
3030 const el = render ( < Markdown source = { str } /> )
31- expect ( el . prop ( "outerHTML" ) ) . toEqual ( `<div class="markdown"><p><img title="Image title " alt="Image alt text" src="http://image.source "></p>\n</div>` )
31+ expect ( el . prop ( "outerHTML" ) ) . toEqual ( `<div class="markdown"><p><img src="http://image.source " alt="Image alt text" title="Image title "></p>\n</div>` )
3232 } )
3333
3434 it ( "allows image elements with https scheme" , function ( ) {
3535 const str = ``
3636 const el = render ( < Markdown source = { str } /> )
37- expect ( el . prop ( "outerHTML" ) ) . toEqual ( `<div class="markdown"><p><img title="Image title " alt="Image alt text" src="https://image.source "></p>\n</div>` )
37+ expect ( el . prop ( "outerHTML" ) ) . toEqual ( `<div class="markdown"><p><img src="https://image.source " alt="Image alt text" title="Image title "></p>\n</div>` )
3838 } )
3939
4040 it ( "allows image elements with data scheme" , function ( ) {
@@ -58,7 +58,7 @@ describe("Markdown component", function () {
5858 it ( "allows links" , function ( ) {
5959 const str = `[Link](https://example.com/)`
6060 const el = render ( < Markdown source = { str } /> )
61- expect ( el . prop ( "outerHTML" ) ) . toEqual ( `<div class="markdown"><p><a rel="noopener noreferrer " target="_blank" href="https://example.com/ ">Link</a></p>\n</div>` )
61+ expect ( el . prop ( "outerHTML" ) ) . toEqual ( `<div class="markdown"><p><a href="https://example.com/ " target="_blank" rel="noopener noreferrer ">Link</a></p>\n</div>` )
6262 } )
6363 } )
6464
@@ -67,7 +67,7 @@ describe("Markdown component", function () {
6767 const getConfigs = ( ) => ( { useUnsafeMarkdown : true } )
6868 const str = `<span class="method" style="border-width: 1px" data-attr="value">ONE</span>`
6969 const el = render ( < OAS3Markdown source = { str } getConfigs = { getConfigs } /> )
70- expect ( el . prop ( "outerHTML" ) ) . toEqual ( `<div class="renderedMarkdown"><p><span data-attr="value " style="border-width: 1px" class="method ">ONE</span></p></div>` )
70+ expect ( el . prop ( "outerHTML" ) ) . toEqual ( `<div class="renderedMarkdown"><p><span class="method " style="border-width: 1px" data-attr="value ">ONE</span></p></div>` )
7171 } )
7272
7373 it ( "strips class, style and data-* attribs from elements" , function ( ) {
@@ -80,13 +80,13 @@ describe("Markdown component", function () {
8080 it ( "allows image elements" , function ( ) {
8181 const str = ``
8282 const el = render ( < OAS3Markdown source = { str } /> )
83- expect ( el . prop ( "outerHTML" ) ) . toEqual ( `<div class="renderedMarkdown"><p><img title="Image title " alt="Image alt text" src="http://image.source "></p></div>` )
83+ expect ( el . prop ( "outerHTML" ) ) . toEqual ( `<div class="renderedMarkdown"><p><img src="http://image.source " alt="Image alt text" title="Image title "></p></div>` )
8484 } )
8585
8686 it ( "allows image elements with https scheme" , function ( ) {
8787 const str = ``
8888 const el = render ( < OAS3Markdown source = { str } /> )
89- expect ( el . prop ( "outerHTML" ) ) . toEqual ( `<div class="renderedMarkdown"><p><img title="Image title " alt="Image alt text" src="https://image.source "></p></div>` )
89+ expect ( el . prop ( "outerHTML" ) ) . toEqual ( `<div class="renderedMarkdown"><p><img src="https://image.source " alt="Image alt text" title="Image title "></p></div>` )
9090 } )
9191
9292 it ( "allows image elements with data scheme" , function ( ) {
0 commit comments