@@ -616,27 +616,41 @@ fn list() -> Result<(), String> {
616616 ) ;
617617
618618 assert_eq ! (
619- to_mdast( "3. a" , & Default :: default ( ) ) ?,
619+ to_mdast( "3. a\n 4. b " , & Default :: default ( ) ) ?,
620620 Node :: Root ( Root {
621621 children: vec![ Node :: List ( List {
622622 ordered: true ,
623623 spread: false ,
624624 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+ } ) , ] ,
631634 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 ) )
638652 } ) ] ,
639- position: Some ( Position :: new( 1 , 1 , 0 , 1 , 5 , 4 ) )
653+ position: Some ( Position :: new( 1 , 1 , 0 , 2 , 5 , 9 ) )
640654 } ) ,
641655 "should support `start` fields on `List` w/ `ordered: true` in mdast"
642656 ) ;
0 commit comments