From b25662e183fa800d13908e707e0a3f33131b9ea8 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 3 May 2024 09:39:58 +0200 Subject: fix nested lists by parsing li before ul or ol and add a test --- tests/unit/includes/BBCodeTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/unit/includes/BBCodeTest.php') diff --git a/tests/unit/includes/BBCodeTest.php b/tests/unit/includes/BBCodeTest.php index a8aa8ee2b..e1fba9fbc 100644 --- a/tests/unit/includes/BBCodeTest.php +++ b/tests/unit/includes/BBCodeTest.php @@ -230,6 +230,14 @@ class BBCodeTest extends UnitTestCase { 'html reshares from streams' => [ '
image/photo shared something
something
', '[url=https://example.com][img=https://example.com/image.jpg]image/photo[/img][/url] shared something' . "\n" . 'something' + ], + 'list' => [ + '', + '[list][*]list 1[*]list 2[*]list 3[/list]' + ], + 'nested list' => [ + '', + '[list][*]list 1[*]list 2[*]list 3[list][*]list 1[*]list 2[*]list 3[/list][/list]' ] ]; } -- cgit v1.2.3