@@ -3585,5 +3585,81 @@ test('roundtrip', (t) => {
35853585 'should roundtrip encoded spaces and tabs where needed'
35863586 )
35873587
3588+ doc = `Separate paragraphs:
3589+
3590+ a * is this emphasis? *
3591+
3592+ a ** is this emphasis? **
3593+
3594+ a *** is this emphasis? ***
3595+
3596+ a *\\* is this emphasis? *\\*
3597+
3598+ a \\** is this emphasis? \\**
3599+
3600+ a **\\* is this emphasis? **\\*
3601+
3602+ a *\\** is this emphasis? *\\**
3603+
3604+ One paragraph:
3605+
3606+ a * is this emphasis? *
3607+ a ** is this emphasis? **
3608+ a *** is this emphasis? ***
3609+ a *\\* is this emphasis? *\\*
3610+ a \\** is this emphasis? \\**
3611+ a **\\* is this emphasis? **\\*
3612+ a *\\** is this emphasis? *\\**`
3613+ tree = from ( doc )
3614+
3615+ t . deepEqual (
3616+ removePosition ( tree , true ) ,
3617+ removePosition ( from ( to ( tree ) ) , true ) ,
3618+ 'should roundtrip asterisks (tree)'
3619+ )
3620+
3621+ doc = `Separate paragraphs:
3622+
3623+ a _ is this emphasis? _
3624+
3625+ a __ is this emphasis? __
3626+
3627+ a ___ is this emphasis? ___
3628+
3629+ a _\\_ is this emphasis? _\\_
3630+
3631+ a \\__ is this emphasis? \\__
3632+
3633+ a __\\_ is this emphasis? __\\_
3634+
3635+ a _\\__ is this emphasis? _\\__
3636+
3637+ One paragraph:
3638+
3639+ a _ is this emphasis? _
3640+ a __ is this emphasis? __
3641+ a ___ is this emphasis? ___
3642+ a _\\_ is this emphasis? _\\_
3643+ a \\__ is this emphasis? \\__
3644+ a __\\_ is this emphasis? __\\_
3645+ a _\\__ is this emphasis? _\\__`
3646+ tree = from ( doc )
3647+
3648+ t . deepEqual (
3649+ removePosition ( tree , true ) ,
3650+ removePosition ( from ( to ( tree ) ) , true ) ,
3651+ 'should roundtrip underscores (tree)'
3652+ )
3653+
3654+ doc = to ( from ( `(____` ) )
3655+
3656+ t . equal ( doc , to ( from ( doc ) ) , 'should roundtrip attention-like plain text' )
3657+
3658+ doc = to (
3659+ from ( 'Once activated, a service worker ______, then transitions to idle…' )
3660+ )
3661+
3662+ t . equal ( doc , to ( from ( doc ) ) , 'should roundtrip faux “fill in the blank” spans' )
3663+
35883664 t . end ( )
35893665} )
0 commit comments