@@ -35,7 +35,7 @@ it('should throw if not passed a string (first arg)', () => {
3535it ( 'should handle a basic string' , ( ) => {
3636 render ( compiler ( 'Hello.' ) )
3737
38- expect ( root . innerHTML ) . toBe ( '<span> Hello.</span> ' )
38+ expect ( root . innerHTML ) . toBe ( 'Hello.' )
3939} )
4040
4141it ( 'wraps multiple block element returns in a div to avoid invalid nesting errors' , ( ) => {
@@ -468,21 +468,15 @@ describe('inline textual elements', () => {
468468 it ( 'should handle escaped text' , ( ) => {
469469 render ( compiler ( 'Hello.\\_\\_foo\\_\\_' ) )
470470
471- expect ( root . innerHTML ) . toMatchInlineSnapshot ( `
472- <span>
473- Hello.__foo__
474- </span>
475- ` )
471+ expect ( root . innerHTML ) . toMatchInlineSnapshot ( `"Hello.__foo__"` )
476472 } )
477473
478474 it ( 'regression test for #188, mismatched syntaxes triggered the wrong result' , ( ) => {
479475 render ( compiler ( '*This should render as normal text, not emphasized._' ) )
480476
481- expect ( root . innerHTML ) . toMatchInlineSnapshot ( `
482- <span>
483- *This should render as normal text, not emphasized._
484- </span>
485- ` )
477+ expect ( root . innerHTML ) . toMatchInlineSnapshot (
478+ `"*This should render as normal text, not emphasized._"`
479+ )
486480 } )
487481
488482 it ( 'ignore similar syntax inside inline syntax' , ( ) => {
@@ -582,11 +576,7 @@ describe('inline textual elements', () => {
582576 it ( 'replaces common HTML character codes with unicode equivalents so React will render correctly' , ( ) => {
583577 render ( compiler ( 'Foo bar&baz.' ) )
584578
585- expect ( root . innerHTML ) . toMatchInlineSnapshot ( `
586- <span>
587- Foo bar&baz.
588- </span>
589- ` )
579+ expect ( root . innerHTML ) . toMatchInlineSnapshot ( `"Foo bar&baz."` )
590580 } )
591581
592582 it ( 'replaces custom named character codes with unicode equivalents so React will render correctly' , ( ) => {
@@ -599,11 +589,9 @@ describe('inline textual elements', () => {
599589 } )
600590 )
601591
602- expect ( root . innerHTML ) . toMatchInlineSnapshot ( `
603- <span>
604- Apostrophe's and ≤ equal
605- </span>
606- ` )
592+ expect ( root . innerHTML ) . toMatchInlineSnapshot (
593+ `"Apostrophe's and ≤ equal"`
594+ )
607595 } )
608596} )
609597
@@ -1308,11 +1296,7 @@ describe('links', () => {
13081296 it ( 'should not link bare URL if disabled via options' , ( ) => {
13091297 render ( compiler ( 'https://google.com' , { disableAutoLink : true } ) )
13101298
1311- expect ( root . innerHTML ) . toMatchInlineSnapshot ( `
1312- <span>
1313- https://google.com
1314- </span>
1315- ` )
1299+ expect ( root . innerHTML ) . toMatchInlineSnapshot ( `"https://google.com"` )
13161300 } )
13171301
13181302 it ( 'should not sanitize markdown when explicitly disabled' , ( ) => {
@@ -3478,11 +3462,7 @@ comment -->`)
34783462 it ( '#180 handles invalid character error with angle brackets' , ( ) => {
34793463 render ( compiler ( '1<2 or 2>1' ) )
34803464
3481- expect ( root . innerHTML ) . toMatchInlineSnapshot ( `
3482- <span>
3483- 1<2 or 2>1
3484- </span>
3485- ` )
3465+ expect ( root . innerHTML ) . toMatchInlineSnapshot ( `"1<2 or 2>1"` )
34863466 } )
34873467
34883468 it ( '#181 handling of figure blocks' , ( ) => {
@@ -3754,11 +3734,9 @@ comment -->`)
37543734 disableParsingRawHTML : true ,
37553735 } )
37563736 )
3757- expect ( root . innerHTML ) . toMatchInlineSnapshot ( `
3758- <span>
3759- Text with <span>html</span> inside
3760- </span>
3761- ` )
3737+ expect ( root . innerHTML ) . toMatchInlineSnapshot (
3738+ `"Text with <span>html</span> inside"`
3739+ )
37623740 } )
37633741
37643742 it ( 'should render html if disableParsingRawHTML is false' , ( ) => {
@@ -4626,11 +4604,9 @@ describe('options.namedCodesToUnicode', () => {
46264604
46274605 it ( 'should replace special HTML characters' , ( ) => {
46284606 render ( compiler ( content , { namedCodesToUnicode } ) )
4629- expect ( root . innerHTML ) . toMatchInlineSnapshot ( `
4630- <span>
4631- Æ,Á,Â,À,Å,Ã,Ä,Ç,É,Ê,È,Ë,Í,Î,Ì,Ï,Ñ,Ó,Ô,Ò,Ø,Õ,Ö,Ú,Û,Ù,Ü,Ý,á,â,æ,à,å,ã,ä,ç,©,é,ê,è,ë,≥,í,î,ì,ï,«,≤, ,ñ,ó,ô,ò,ø,õ,ö,§,",»,ß,ú,û,ù,ü,ý
4632- </span>
4633- ` )
4607+ expect ( root . innerHTML ) . toMatchInlineSnapshot (
4608+ `"Æ,Á,Â,À,Å,Ã,Ä,Ç,É,Ê,È,Ë,Í,Î,Ì,Ï,Ñ,Ó,Ô,Ò,Ø,Õ,Ö,Ú,Û,Ù,Ü,Ý,á,â,æ,à,å,ã,ä,ç,©,é,ê,è,ë,≥,í,î,ì,ï,«,≤, ,ñ,ó,ô,ò,ø,õ,ö,§,",»,ß,ú,û,ù,ü,ý"`
4609+ )
46344610 } )
46354611} )
46364612
@@ -4658,23 +4634,15 @@ describe('options.forceInline', () => {
46584634 it ( 'treats given markdown as inline-context, passing through any block-level markdown syntax' , ( ) => {
46594635 render ( compiler ( '# You got it babe!' , { forceInline : true } ) )
46604636
4661- expect ( root . innerHTML ) . toMatchInlineSnapshot ( `
4662- <span>
4663- # You got it babe!
4664- </span>
4665- ` )
4637+ expect ( root . innerHTML ) . toMatchInlineSnapshot ( `"# You got it babe!"` )
46664638 } )
46674639} )
46684640
46694641describe ( 'options.wrapper' , ( ) => {
46704642 it ( 'is ignored when there is a single child' , ( ) => {
46714643 render ( compiler ( 'Hello, world!' , { wrapper : 'article' } ) )
46724644
4673- expect ( root . innerHTML ) . toMatchInlineSnapshot ( `
4674- <span>
4675- Hello, world!
4676- </span>
4677- ` )
4645+ expect ( root . innerHTML ) . toMatchInlineSnapshot ( `"Hello, world!"` )
46784646 } )
46794647
46804648 it ( 'overrides the wrapper element when there are multiple children' , ( ) => {
@@ -4762,11 +4730,7 @@ describe('options.createElement', () => {
47624730 } )
47634731 )
47644732
4765- expect ( root . innerHTML ) . toMatchInlineSnapshot ( `
4766- <custom>
4767- Hello
4768- </custom>
4769- ` )
4733+ expect ( root . innerHTML ) . toMatchInlineSnapshot ( `"Hello"` )
47704734 } )
47714735
47724736 it ( 'should render an empty <div> element' , ( ) => {
@@ -4778,10 +4742,7 @@ describe('options.createElement', () => {
47784742 } )
47794743 )
47804744
4781- expect ( root . innerHTML ) . toMatchInlineSnapshot ( `
4782- <div>
4783- </div>
4784- ` )
4745+ expect ( root . innerHTML ) . toMatchInlineSnapshot ( `"Hello"` )
47854746 } )
47864747} )
47874748
@@ -5193,11 +5154,7 @@ it('should remove YAML front matter', () => {
51935154 ` )
51945155 )
51955156
5196- expect ( root . innerHTML ) . toMatchInlineSnapshot ( `
5197- <span>
5198- Hello.
5199- </span>
5200- ` )
5157+ expect ( root . innerHTML ) . toMatchInlineSnapshot ( `"Hello."` )
52015158} )
52025159
52035160it ( 'correctly parses YAML front matter inside a code block' , ( ) => {
0 commit comments