@@ -184,29 +184,29 @@ public function testLists(): void
184184 {
185185 $ this ->assertHtmlGivesMarkdown ('<ul><li>Item A</li><li>Item B</li><li>Item C</li></ul> ' , "- Item A \n- Item B \n- Item C " );
186186 $ this ->assertHtmlGivesMarkdown ('<ul><li> Item A</li><li> Item B</li></ul> ' , "- Item A \n- Item B " );
187- $ this ->assertHtmlGivesMarkdown ('<ul><li> <h3> Item A</h3><p>Description</p></li><li> Item B</li></ul> ' , "- ### Item A \n \n Description \n- Item B " );
187+ $ this ->assertHtmlGivesMarkdown ('<ul><li> <h3> Item A</h3><p>Description</p></li><li> Item B</li></ul> ' , "- ### Item A \n \n Description \n- Item B " );
188188 $ this ->assertHtmlGivesMarkdown ('<ul><li>First</li><li>Second</li></ul> ' , "* First \n* Second " , ['list_item_style ' => '* ' ]);
189189 $ this ->assertHtmlGivesMarkdown ('<ol><li>Item A</li><li>Item B</li></ol> ' , "1. Item A \n2. Item B " );
190190 $ this ->assertHtmlGivesMarkdown ("<ol> \n <li>Item A</li> \n <li>Item B</li> \n</ol> " , "1. Item A \n2. Item B " );
191191 $ this ->assertHtmlGivesMarkdown ('<ol><li> Item A</li><li> Item B</li></ol> ' , "1. Item A \n2. Item B " );
192- $ this ->assertHtmlGivesMarkdown ('<ol><li> <h3> Item A</h3><p>Description</p></li><li> Item B</li></ol> ' , "1. ### Item A \n \n Description \n2. Item B " );
192+ $ this ->assertHtmlGivesMarkdown ('<ol><li> <h3> Item A</h3><p>Description</p></li><li> Item B</li></ol> ' , "1. ### Item A \n \n Description \n2. Item B " );
193193 $ this ->assertHtmlGivesMarkdown ('<ol start="120"><li>Item A</li><li>Item B</li></ol> ' , "120. Item A \n121. Item B " );
194194 $ this ->assertHtmlGivesMarkdown ('<ul><li>first item of first list</li><li>second item of first list</li></ul><ul><li>first item of second list</li></ul> ' , "- first item of first list \n- second item of first list \n\n* first item of second list " , ['list_item_style_alternate ' => '* ' ]);
195195 }
196196
197197 public function testNestedLists (): void
198198 {
199- $ this ->assertHtmlGivesMarkdown ('<ul><li>Item A</li><li>Item B<ul><li>Nested A</li><li>Nested B</li></ul></li><li>Item C</li></ul> ' , "- Item A \n- Item B \n - Nested A \n - Nested B \n- Item C " );
200- $ this ->assertHtmlGivesMarkdown ('<ul><li> Item A<ol><li>Nested A</li></ol></li><li> Item B</li></ul> ' , "- Item A \n 1. Nested A \n- Item B " );
201- $ this ->assertHtmlGivesMarkdown ('<ol><li>Item A<ul><li>Nested A</li></ul></li><li>Item B</li></ol> ' , "1. Item A \n - Nested A \n2. Item B " );
199+ $ this ->assertHtmlGivesMarkdown ('<ul><li>Item A</li><li>Item B<ul><li>Nested A</li><li>Nested B</li></ul></li><li>Item C</li></ul> ' , "- Item A \n- Item B \n - Nested A \n - Nested B \n- Item C " );
200+ $ this ->assertHtmlGivesMarkdown ('<ul><li> Item A<ol><li>Nested A</li></ol></li><li> Item B</li></ul> ' , "- Item A \n 1. Nested A \n- Item B " );
201+ $ this ->assertHtmlGivesMarkdown ('<ol><li>Item A<ul><li>Nested A</li></ul></li><li>Item B</li></ol> ' , "1. Item A \n - Nested A \n2. Item B " );
202202 }
203203
204204 public function testComplexNestedLists (): void
205205 {
206- $ this ->assertHtmlGivesMarkdown ("<ul> \n<li>Item A</li> \n<li>Item B \n<ul> \n<li>Nested A</li> \n<li>Nested B \n<ul> \n<li>Subnested A</li> \n<li>Subnested B</li> \n</ul> \n</li> \n</ul> \n</li> \n<li>Item C</li> \n</ul> " , "- Item A \n- Item B \n - Nested A \n - Nested B \n - Subnested A \n - Subnested B \n- Item C " );
207- $ this ->assertHtmlGivesMarkdown ("<ul> \n<li>Item A</li> \n<li><h2>Item B</h2> \n<p>Paragraph Item B</p> \n<ul> \n<li>Nested A</li> \n<li>Nested B \n<ul> \n<li>Subnested A</li> \n<li>Subnested B</li> \n</ul> \n</li> \n</ul> \n</li> \n<li>Item C</li> \n</ul> " , "* Item A \n* ## Item B \n \n Paragraph Item B \n \n \n * Nested A \n * Nested B \n * Subnested A \n * Subnested B \n* Item C " , ['list_item_style ' => '* ' , 'header_style ' => 'atx ' ]);
208- $ this ->assertHtmlGivesMarkdown ("<ul> \n<li>Item A</li> \n<li><h2>Item B</h2> \n<p>Paragraph Item B</p> \n<ul> \n<li>Nested A</li> \n<li><h2>Nested B</h2> \n<p>Paragraph Nested B</p> \n<ul> \n<li>Subnested A</li> \n<li>Subnested B \n<ul> \n<li>Subsubnested A</li> \n<li><h2>Subsubnested B</h2> \n<p>Paragraph Subsubnested B</p> \n<ul> \n<li>Subsubsubnested A</li> \n<li>Subsubsubnested B</li> \n</ul> \n</li> \n</ul> \n</li> \n</ul> \n</li> \n</ul> \n</li> \n<li>Item C</li> \n</ul> " , "* Item A \n* ## Item B \n \n Paragraph Item B \n \n \n * Nested A \n * ## Nested B \n \n Paragraph Nested B \n \n \n * Subnested A \n * Subnested B \n * Subsubnested A \n * ## Subsubnested B \n \n Paragraph Subsubnested B \n \n \n * Subsubsubnested A \n * Subsubsubnested B \n* Item C " , ['list_item_style ' => '* ' , 'header_style ' => 'atx ' ]);
209- $ this ->assertHtmlGivesMarkdown ("<ul> \n<li>Item A</li> \n<li>Item B \n<ul> \n<li>Nested A</li> \n<li>Nested B \n<ul> \n<li>Subnested A</li> \n<li>Subnested B \n<ul> \n<li>Subsubnested A</li> \n<li>Subsubnested B \n<ul> \n<li>Subsubsubnested A</li> \n<li>Subsubsubnested B</li> \n</ul> \n</li> \n</ul> \n</li> \n</ul> \n</li> \n</ul> \n</li> \n<li>Item C</li> \n</ul> " , "* Item A \n* Item B \n * Nested A \n * Nested B \n * Subnested A \n * Subnested B \n * Subsubnested A \n * Subsubnested B \n * Subsubsubnested A \n * Subsubsubnested B \n* Item C " , ['list_item_style ' => '* ' , 'header_style ' => 'atx ' ]);
206+ $ this ->assertHtmlGivesMarkdown ("<ul> \n<li>Item A</li> \n<li>Item B \n<ul> \n<li>Nested A</li> \n<li>Nested B \n<ul> \n<li>Subnested A</li> \n<li>Subnested B</li> \n</ul> \n</li> \n</ul> \n</li> \n<li>Item C</li> \n</ul> " , "- Item A \n- Item B \n - Nested A \n - Nested B \n - Subnested A \n - Subnested B \n- Item C " );
207+ $ this ->assertHtmlGivesMarkdown ("<ul> \n<li>Item A</li> \n<li><h2>Item B</h2> \n<p>Paragraph Item B</p> \n<ul> \n<li>Nested A</li> \n<li>Nested B \n<ul> \n<li>Subnested A</li> \n<li>Subnested B</li> \n</ul> \n</li> \n</ul> \n</li> \n<li>Item C</li> \n</ul> " , "* Item A \n* ## Item B \n \n Paragraph Item B \n \n \n * Nested A \n * Nested B \n * Subnested A \n * Subnested B \n* Item C " , ['list_item_style ' => '* ' , 'header_style ' => 'atx ' ]);
208+ $ this ->assertHtmlGivesMarkdown ("<ul> \n<li>Item A</li> \n<li><h2>Item B</h2> \n<p>Paragraph Item B</p> \n<ul> \n<li>Nested A</li> \n<li><h2>Nested B</h2> \n<p>Paragraph Nested B</p> \n<ul> \n<li>Subnested A</li> \n<li>Subnested B \n<ul> \n<li>Subsubnested A</li> \n<li><h2>Subsubnested B</h2> \n<p>Paragraph Subsubnested B</p> \n<ul> \n<li>Subsubsubnested A</li> \n<li>Subsubsubnested B</li> \n</ul> \n</li> \n</ul> \n</li> \n</ul> \n</li> \n</ul> \n</li> \n<li>Item C</li> \n</ul> " , "* Item A \n* ## Item B \n \n Paragraph Item B \n \n \n * Nested A \n * ## Nested B \n \n Paragraph Nested B \n \n \n * Subnested A \n * Subnested B \n * Subsubnested A \n * ## Subsubnested B \n \n Paragraph Subsubnested B \n \n \n * Subsubsubnested A \n * Subsubsubnested B \n* Item C " , ['list_item_style ' => '* ' , 'header_style ' => 'atx ' ]);
209+ $ this ->assertHtmlGivesMarkdown ("<ul> \n<li>Item A</li> \n<li>Item B \n<ul> \n<li>Nested A</li> \n<li>Nested B \n<ul> \n<li>Subnested A</li> \n<li>Subnested B \n<ul> \n<li>Subsubnested A</li> \n<li>Subsubnested B \n<ul> \n<li>Subsubsubnested A</li> \n<li>Subsubsubnested B</li> \n</ul> \n</li> \n</ul> \n</li> \n</ul> \n</li> \n</ul> \n</li> \n<li>Item C</li> \n</ul> " , "* Item A \n* Item B \n * Nested A \n * Nested B \n * Subnested A \n * Subnested B \n * Subsubnested A \n * Subsubnested B \n * Subsubsubnested A \n * Subsubsubnested B \n* Item C " , ['list_item_style ' => '* ' , 'header_style ' => 'atx ' ]);
210210 }
211211
212212 public function testListLikeThingsWhichArentLists (): void
@@ -394,7 +394,7 @@ public function testSanitization(): void
394394 $ this ->assertHtmlGivesMarkdown ('<p>> > Look at me! < <</p> ' , '> > Look at me! < < ' );
395395 $ this ->assertHtmlGivesMarkdown ('<p>> > <b>Look</b> at me! < <<br />> Just look at me!</p> ' , "> > **Look** at me! < < \n> Just look at me! " );
396396 $ this ->assertHtmlGivesMarkdown ('<p>Foo<br>--<br>Bar<br>Foo--</p> ' , "Foo \n\\-- \nBar \nFoo-- " );
397- $ this ->assertHtmlGivesMarkdown ('<ul><li>Foo<br>- Bar</li></ul> ' , "- Foo \n \\- Bar " );
397+ $ this ->assertHtmlGivesMarkdown ('<ul><li>Foo<br>- Bar</li></ul> ' , "- Foo \n \\- Bar " );
398398 $ this ->assertHtmlGivesMarkdown ('Foo<br />* Bar ' , "Foo \n\\* Bar " );
399399 $ this ->assertHtmlGivesMarkdown ("<p>123456789) Foo and 1234567890) Bar!</p> \n<p>1. Platz in 'Das große Backen'</p> " , "123456789 \\) Foo and 1234567890) Bar! \n\n1 \\. Platz in 'Das große Backen' " );
400400 $ this ->assertHtmlGivesMarkdown ("<p> \n+ Siri works well for TV and movies<br> \n- No 4K support \n</p> " , "\+ Siri works well for TV and movies \n\- No 4K support " );
0 commit comments