File tree 2 files changed +39
-2
lines changed
2 files changed +39
-2
lines changed Original file line number Diff line number Diff line change @@ -775,7 +775,7 @@ function inferDepth(state) {
775
775
while ( -- index > - 1 ) {
776
776
const name = state . stack [ index ]
777
777
778
- if ( name === 'listItem' ) break
778
+ if ( name === 'blockquote' || name === ' listItem') break
779
779
if ( name === 'mdxJsxFlowElement' ) depth ++
780
780
}
781
781
Original file line number Diff line number Diff line change @@ -2550,7 +2550,7 @@ test('roundtrip', async function (t) {
2550
2550
}
2551
2551
)
2552
2552
2553
- await t . test ( 'should roundtrip `nested JSXs and lists`' , async function ( ) {
2553
+ await t . test ( 'should roundtrip `nested JSX and lists`' , async function ( ) {
2554
2554
const source = `<x>
2555
2555
* Alpha
2556
2556
@@ -2583,6 +2583,43 @@ test('roundtrip', async function (t) {
2583
2583
`
2584
2584
equal ( source , source )
2585
2585
} )
2586
+
2587
+ await t . test (
2588
+ 'should roundtrip `nested JSX and block quotes`' ,
2589
+ async function ( ) {
2590
+ const source = `<x>
2591
+ > Alpha
2592
+ >
2593
+ > <y>
2594
+ > > Bravo
2595
+ > >
2596
+ > > <z>
2597
+ > > <a>
2598
+ > > > Charlie
2599
+ > > >
2600
+ > > > > Delta
2601
+ > > > >
2602
+ > > > > <b>
2603
+ > > > > Echo
2604
+ > > > > </b>
2605
+ > > >
2606
+ > > > <b>
2607
+ > > > Foxtrot
2608
+ > > > </b>
2609
+ > > </a>
2610
+ > > </z>
2611
+ > </y>
2612
+
2613
+ <y>
2614
+ <z>
2615
+ Golf
2616
+ </z>
2617
+ </y>
2618
+ </x>
2619
+ `
2620
+ equal ( source , source )
2621
+ }
2622
+ )
2586
2623
} )
2587
2624
2588
2625
/**
You can’t perform that action at this time.
0 commit comments