@@ -3579,132 +3579,146 @@ test('roundtrip', () => {
35793579 let tree = from ( '* a\n- b' )
35803580
35813581 assert . deepEqual (
3582- removePosition ( tree , true ) ,
3583- removePosition ( from ( to ( tree , { bullet : '*' , bulletOther : '-' } ) ) , true ) ,
3582+ removePosition ( tree , { force : true } ) ,
3583+ removePosition ( from ( to ( tree , { bullet : '*' , bulletOther : '-' } ) ) , {
3584+ force : true
3585+ } ) ,
35843586 'should roundtrip different lists w/ `bulletOther`'
35853587 )
35863588
35873589 tree = from ( '* ---\n- - +\n+ b' )
35883590
35893591 assert . deepEqual (
3590- removePosition ( tree , true ) ,
3591- removePosition ( from ( to ( tree , { bullet : '*' , bulletOther : '-' } ) ) , true ) ,
3592+ removePosition ( tree , { force : true } ) ,
3593+ removePosition ( from ( to ( tree , { bullet : '*' , bulletOther : '-' } ) ) , {
3594+ force : true
3595+ } ) ,
35923596 'should roundtrip different lists w/ `bulletOther` and lists that could turn into thematic breaks (1)'
35933597 )
35943598
35953599 tree = from ( '- - +\n* ---\n+ b' )
35963600
35973601 assert . deepEqual (
3598- removePosition ( tree , true ) ,
3599- removePosition ( from ( to ( tree , { bullet : '*' , bulletOther : '-' } ) ) , true ) ,
3602+ removePosition ( tree , { force : true } ) ,
3603+ removePosition ( from ( to ( tree , { bullet : '*' , bulletOther : '-' } ) ) , {
3604+ force : true
3605+ } ) ,
36003606 'should roundtrip different lists w/ `bulletOther` and lists that could turn into thematic breaks (2)'
36013607 )
36023608
36033609 tree = from ( '- - +\n- -' )
36043610
36053611 assert . deepEqual (
3606- removePosition ( tree , true ) ,
3607- removePosition ( from ( to ( tree , { bullet : '*' , bulletOther : '-' } ) ) , true ) ,
3612+ removePosition ( tree , { force : true } ) ,
3613+ removePosition ( from ( to ( tree , { bullet : '*' , bulletOther : '-' } ) ) , {
3614+ force : true
3615+ } ) ,
36083616 'should roundtrip different lists w/ `bulletOther` and lists that could turn into thematic breaks (3)'
36093617 )
36103618
36113619 tree = from ( '* - +\n *\n -\n +' )
36123620
36133621 assert . deepEqual (
3614- removePosition ( tree , true ) ,
3615- removePosition ( from ( to ( tree , { bullet : '*' , bulletOther : '-' } ) ) , true ) ,
3622+ removePosition ( tree , { force : true } ) ,
3623+ removePosition ( from ( to ( tree , { bullet : '*' , bulletOther : '-' } ) ) , {
3624+ force : true
3625+ } ) ,
36163626 'should roundtrip different lists w/ `bulletOther` and lists that could turn into thematic breaks (4)'
36173627 )
36183628
36193629 tree = from ( '* - +\n - *\n -\n +' )
36203630
36213631 assert . deepEqual (
3622- removePosition ( tree , true ) ,
3623- removePosition ( from ( to ( tree , { bullet : '*' , bulletOther : '-' } ) ) , true ) ,
3632+ removePosition ( tree , { force : true } ) ,
3633+ removePosition ( from ( to ( tree , { bullet : '*' , bulletOther : '-' } ) ) , {
3634+ force : true
3635+ } ) ,
36243636 'should roundtrip different lists w/ `bulletOther` and lists that could turn into thematic breaks (5)'
36253637 )
36263638
36273639 tree = from ( '- +\n- *\n -\n +' )
36283640
36293641 assert . deepEqual (
3630- removePosition ( tree , true ) ,
3631- removePosition ( from ( to ( tree , { bullet : '*' , bulletOther : '-' } ) ) , true ) ,
3642+ removePosition ( tree , { force : true } ) ,
3643+ removePosition ( from ( to ( tree , { bullet : '*' , bulletOther : '-' } ) ) , {
3644+ force : true
3645+ } ) ,
36323646 'should roundtrip different lists w/ `bulletOther` and lists that could turn into thematic breaks (6)'
36333647 )
36343648
36353649 tree = from ( '1. a\n1) b' )
36363650
36373651 assert . deepEqual (
3638- removePosition ( tree , true ) ,
3652+ removePosition ( tree , { force : true } ) ,
36393653 removePosition (
36403654 from ( to ( tree , { bulletOrdered : '.' , bulletOrderedOther : ')' } ) ) ,
3641- true
3655+ { force : true }
36423656 ) ,
36433657 'should roundtrip different lists w/ `bulletOrderedOther`'
36443658 )
36453659
36463660 tree = from ( '1. ---\n1) 1. 1)\n1. b' )
36473661
36483662 assert . deepEqual (
3649- removePosition ( tree , true ) ,
3663+ removePosition ( tree , { force : true } ) ,
36503664 removePosition (
36513665 from ( to ( tree , { bulletOrdered : '.' , bulletOrderedOther : ')' } ) ) ,
3652- true
3666+ { force : true }
36533667 ) ,
36543668 'should roundtrip different lists w/ `bulletOrderedOther` and lists that could turn into thematic breaks (1)'
36553669 )
36563670
36573671 tree = from ( '1. 1. 1)\n1) ---\n1. b' )
36583672
36593673 assert . deepEqual (
3660- removePosition ( tree , true ) ,
3674+ removePosition ( tree , { force : true } ) ,
36613675 removePosition (
36623676 from ( to ( tree , { bulletOrdered : '.' , bulletOrderedOther : ')' } ) ) ,
3663- true
3677+ { force : true }
36643678 ) ,
36653679 'should roundtrip different lists w/ `bulletOrderedOther` and lists that could turn into thematic breaks (2)'
36663680 )
36673681
36683682 tree = from ( '1. 1. 1)\n1. 1.' )
36693683
36703684 assert . deepEqual (
3671- removePosition ( tree , true ) ,
3685+ removePosition ( tree , { force : true } ) ,
36723686 removePosition (
36733687 from ( to ( tree , { bulletOrdered : '.' , bulletOrderedOther : ')' } ) ) ,
3674- true
3688+ { force : true }
36753689 ) ,
36763690 'should roundtrip different lists w/ `bulletOrderedOther` and lists that could turn into thematic breaks (3)'
36773691 )
36783692
36793693 tree = from ( '1. 1) 1.\n 1.\n 1)\n 1.' )
36803694
36813695 assert . deepEqual (
3682- removePosition ( tree , true ) ,
3696+ removePosition ( tree , { force : true } ) ,
36833697 removePosition (
36843698 from ( to ( tree , { bulletOrdered : '.' , bulletOrderedOther : ')' } ) ) ,
3685- true
3699+ { force : true }
36863700 ) ,
36873701 'should roundtrip different lists w/ `bulletOrderedOther` and lists that could turn into thematic breaks (4)'
36883702 )
36893703
36903704 tree = from ( '1. 1) 1.\n 1) 1.\n 1)\n 1.' )
36913705
36923706 assert . deepEqual (
3693- removePosition ( tree , true ) ,
3707+ removePosition ( tree , { force : true } ) ,
36943708 removePosition (
36953709 from ( to ( tree , { bulletOrdered : '.' , bulletOrderedOther : ')' } ) ) ,
3696- true
3710+ { force : true }
36973711 ) ,
36983712 'should roundtrip different lists w/ `bulletOrderedOther` and lists that could turn into thematic breaks (5)'
36993713 )
37003714
37013715 tree = from ( '1. 1)\n1. 1.\n 1)\n 1.' )
37023716
37033717 assert . deepEqual (
3704- removePosition ( tree , true ) ,
3718+ removePosition ( tree , { force : true } ) ,
37053719 removePosition (
37063720 from ( to ( tree , { bulletOrdered : '.' , bulletOrderedOther : ')' } ) ) ,
3707- true
3721+ { force : true }
37083722 ) ,
37093723 'should roundtrip different lists w/ `bulletOrderedOther` and lists that could turn into thematic breaks (6)'
37103724 )
@@ -3753,8 +3767,8 @@ a *\\** is this emphasis? *\\**`
37533767 tree = from ( doc )
37543768
37553769 assert . deepEqual (
3756- removePosition ( from ( to ( tree ) ) , true ) ,
3757- removePosition ( tree , true ) ,
3770+ removePosition ( from ( to ( tree ) ) , { force : true } ) ,
3771+ removePosition ( tree , { force : true } ) ,
37583772 'should roundtrip asterisks (tree)'
37593773 )
37603774
@@ -3786,8 +3800,8 @@ a _\\__ is this emphasis? _\\__`
37863800 tree = from ( doc )
37873801
37883802 assert . deepEqual (
3789- removePosition ( from ( to ( tree ) ) , true ) ,
3790- removePosition ( tree , true ) ,
3803+ removePosition ( from ( to ( tree ) ) , { force : true } ) ,
3804+ removePosition ( tree , { force : true } ) ,
37913805 'should roundtrip underscores (tree)'
37923806 )
37933807
0 commit comments