@@ -616,27 +616,41 @@ fn list() -> Result<(), String> {
616
616
) ;
617
617
618
618
assert_eq ! (
619
- to_mdast( "3. a" , & Default :: default ( ) ) ?,
619
+ to_mdast( "3. a\n 4. b " , & Default :: default ( ) ) ?,
620
620
Node :: Root ( Root {
621
621
children: vec![ Node :: List ( List {
622
622
ordered: true ,
623
623
spread: false ,
624
624
start: Some ( 3 ) ,
625
- children: vec![ Node :: ListItem ( ListItem {
626
- checked: None ,
627
- spread: false ,
628
- children: vec![ Node :: Paragraph ( Paragraph {
629
- children: vec![ Node :: Text ( Text {
630
- value: "a" . into( ) ,
625
+ children: vec![
626
+ Node :: ListItem ( ListItem {
627
+ checked: None ,
628
+ spread: false ,
629
+ children: vec![ Node :: Paragraph ( Paragraph {
630
+ children: vec![ Node :: Text ( Text {
631
+ value: "a" . into( ) ,
632
+ position: Some ( Position :: new( 1 , 4 , 3 , 1 , 5 , 4 ) )
633
+ } ) , ] ,
631
634
position: Some ( Position :: new( 1 , 4 , 3 , 1 , 5 , 4 ) )
632
- } ) , ] ,
633
- position: Some ( Position :: new( 1 , 4 , 3 , 1 , 5 , 4 ) )
634
- } ) ] ,
635
- position: Some ( Position :: new( 1 , 1 , 0 , 1 , 5 , 4 ) )
636
- } ) ] ,
637
- position: Some ( Position :: new( 1 , 1 , 0 , 1 , 5 , 4 ) )
635
+ } ) ] ,
636
+ position: Some ( Position :: new( 1 , 1 , 0 , 1 , 5 , 4 ) )
637
+ } ) ,
638
+ Node :: ListItem ( ListItem {
639
+ checked: None ,
640
+ spread: false ,
641
+ children: vec![ Node :: Paragraph ( Paragraph {
642
+ children: vec![ Node :: Text ( Text {
643
+ value: "b" . into( ) ,
644
+ position: Some ( Position :: new( 2 , 4 , 8 , 2 , 5 , 9 ) )
645
+ } ) , ] ,
646
+ position: Some ( Position :: new( 2 , 4 , 8 , 2 , 5 , 9 ) )
647
+ } ) ] ,
648
+ position: Some ( Position :: new( 2 , 1 , 5 , 2 , 5 , 9 ) )
649
+ } )
650
+ ] ,
651
+ position: Some ( Position :: new( 1 , 1 , 0 , 2 , 5 , 9 ) )
638
652
} ) ] ,
639
- position: Some ( Position :: new( 1 , 1 , 0 , 1 , 5 , 4 ) )
653
+ position: Some ( Position :: new( 1 , 1 , 0 , 2 , 5 , 9 ) )
640
654
} ) ,
641
655
"should support `start` fields on `List` w/ `ordered: true` in mdast"
642
656
) ;
0 commit comments