From 9f11d189c849249f3b4be9d223520c3cf902dc51 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 21 Mar 2023 20:32:34 +0000 Subject: [PATCH 1/2] Issue 12842: Use BBCode elements that are Markdown agnostic --- src/Content/Text/HTML.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Content/Text/HTML.php b/src/Content/Text/HTML.php index c1bcb0b5b0..89a680501f 100644 --- a/src/Content/Text/HTML.php +++ b/src/Content/Text/HTML.php @@ -283,7 +283,7 @@ class HTML self::tagToBBCode($doc, 'ul', [], "[ul]", "\n[/ul]"); self::tagToBBCode($doc, 'ol', [], "[ol]", "\n[/ol]"); - self::tagToBBCode($doc, 'li', [], "\n[*]", ""); + self::tagToBBCode($doc, 'li', [], "\n[li]", "[/li]"); self::tagToBBCode($doc, 'hr', [], "[hr]", ""); From aef8e90f8e1e8acf6fd9fe90f1a5f18ff5a916d4 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 22 Mar 2023 03:49:40 +0000 Subject: [PATCH 2/2] Tests fixed --- tests/src/Content/Text/HTMLTest.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/src/Content/Text/HTMLTest.php b/tests/src/Content/Text/HTMLTest.php index dc55ad0f0b..c94f180f84 100644 --- a/tests/src/Content/Text/HTMLTest.php +++ b/tests/src/Content/Text/HTMLTest.php @@ -91,18 +91,18 @@ its surprisingly good", 'bug-12842-ul-new-lines' => [ 'expectedBBCode' => 'This is: [ul] -[*]some -[*]amazing -[*]list +[li]some[/li] +[li]amazing[/li] +[li]list[/li] [/ul]', 'html'=> '

This is:

', ], 'bug-12842-ol-new-lines' => [ 'expectedBBCode' => 'This is: [ol] -[*]some -[*]amazing -[*]list +[li]some[/li] +[li]amazing[/li] +[li]list[/li] [/ol]', 'html'=> '

This is:

  1. some
  2. amazing
  3. list
', ],