@@ -358,45 +358,6 @@ describe('paste-markdown', function () {
358358 assert . equal ( textarea . value , markdownSentence )
359359 } )
360360
361- it ( 'finds the right link when identical labels are present chrome and edge' , function ( ) {
362- // eslint-disable-next-line github/unescaped-html-literal
363- const sentence = `<meta charset='utf-8'>
364- <p>foo bar<br>bar<span> </span><a href="https://www.abcxyz.org/">bar</a></p><p>bar<span> </span><a href="https://www.abcxyz.com/">bar</a><span> </span>foo</p>`
365-
366- const markdownSentence = `foo bar
367- bar [bar](https://www.abcxyz.org/)
368-
369- bar [bar](https://www.abcxyz.com/) foo`
370-
371- const plaintextSentence = `foo bar
372- bar bar
373-
374- bar bar foo`
375-
376- paste ( textarea , { 'text/html' : sentence , 'text/plain' : plaintextSentence } )
377- assert . equal ( textarea . value , markdownSentence )
378- } )
379-
380- it ( 'finds the right link when identical labels are present firefox' , function ( ) {
381- // eslint-disable-next-line github/unescaped-html-literal
382- const sentence = `<meta charset='utf-8'>
383- <div><div><p>foo bar<br>
384- bar <a href="https://www.abcxyz.org/">bar</a></p>
385- <p>bar <a href="https://www.abcxyz.com/">bar</a> foo</p></div></div>`
386- const markdownSentence = `foo bar
387- bar [bar](https://www.abcxyz.org/)
388-
389- bar [bar](https://www.abcxyz.com/) foo`
390-
391- const plaintextSentence = `foo bar
392- bar bar
393-
394- bar bar foo`
395-
396- paste ( textarea , { 'text/html' : sentence , 'text/plain' : plaintextSentence } )
397- assert . equal ( textarea . value , markdownSentence )
398- } )
399-
400361 it ( 'pastes markdown with links correctly when identical labels are present' , function ( ) {
401362 // eslint-disable-next-line github/unescaped-html-literal
402363 const sentence = `<meta charset='utf-8'><span>
@@ -445,6 +406,45 @@ bar bar foo`
445406 assert . equal ( textarea . value , markdownSentence )
446407 } )
447408
409+ it ( 'finds the right link when identical labels are present chrome and edge' , function ( ) {
410+ // eslint-disable-next-line github/unescaped-html-literal
411+ const sentence = `<meta charset='utf-8'>
412+ <p>foo bar<br>bar<span> </span><a href="https://www.abcxyz.org/">bar</a></p><p>bar<span> </span><a href="https://www.abcxyz.com/">bar</a><span> </span>foo</p>`
413+
414+ const markdownSentence = `foo bar
415+ bar [bar](https://www.abcxyz.org/)
416+
417+ bar [bar](https://www.abcxyz.com/) foo`
418+
419+ const plaintextSentence = `foo bar
420+ bar bar
421+
422+ bar bar foo`
423+
424+ paste ( textarea , { 'text/html' : sentence , 'text/plain' : plaintextSentence } )
425+ assert . equal ( textarea . value , markdownSentence )
426+ } )
427+
428+ it ( 'finds the right link when identical labels are present firefox' , function ( ) {
429+ // eslint-disable-next-line github/unescaped-html-literal
430+ const sentence = `<meta charset='utf-8'>
431+ <div><div><p>foo bar<br>
432+ bar <a href="https://www.abcxyz.org/">bar</a></p>
433+ <p>bar <a href="https://www.abcxyz.com/">bar</a> foo</p></div></div>`
434+ const markdownSentence = `foo bar
435+ bar [bar](https://www.abcxyz.org/)
436+
437+ bar [bar](https://www.abcxyz.com/) foo`
438+
439+ const plaintextSentence = `foo bar
440+ bar bar
441+
442+ bar bar foo`
443+
444+ paste ( textarea , { 'text/html' : sentence , 'text/plain' : plaintextSentence } )
445+ assert . equal ( textarea . value , markdownSentence )
446+ } )
447+
448448 it ( 'skip markdown formatting with (Ctrl+Shift+v)' , function ( ) {
449449 const data = {
450450 'text/html' : tableHtml
0 commit comments