diff --git a/par/md.test.ts b/par/md.test.ts index 46dbf84..e451967 100644 --- a/par/md.test.ts +++ b/par/md.test.ts @@ -106,11 +106,42 @@ Deno.test({ fn: () => { const par = new MarkdownParser(); - const input = `\ + assertEquals( + ren.render(par.parse(`\ hello -world`; +world`)), + "
hello world
", + ); + }, +}); - assertEquals(ren.render(par.parse(input)), "hello world
"); +Deno.test({ + name: "should parse many big paragraphs", + fn: () => { + const par = new MarkdownParser(); + + assertEquals( + ren.render(par.parse(`\ +hello +world`)), + "hello world
", + ); + + assertEquals( + ren.render(par.parse(`\ +Lorem Ipsum is simply dummy text of the printing +and typesetting industry. + +Lorem Ipsum has been the industry's standard dummy +text ever since the 1500s, when an unknown printer +took a galley of type and scrambled it to make a +type specimen book. + +It has survived not only five centuries, but also +the leap into electronic typesetting, remaining +essentially unchanged.`)), + "Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
", + ); }, }); @@ -258,3 +289,27 @@ Deno.test({ ); }, }); + +// Doc + +Deno.test({ + name: "should parse all document", + only: true, + fn: () => { + const par = new MarkdownParser(); + + const content = `\ +# What is Lorem Ipsum? + +Lorem Ipsum is simply dummy text of the printing and typesetting industry. + +- Sed in orci non lorem luctus dictum ac vel justo. +- Nunc non leo vel dolor fringilla imperdiet. +- Proin finibus ipsum quis molestie porta.`; + + assertEquals( + ren.render(par.parse(content)), + "Lorem Ipsum is simply dummy text of the printing and typesetting industry.