From 2fafae902c96452e9417dabdf4c5df47468b9d1b Mon Sep 17 00:00:00 2001 From: Mark Scherer Date: Wed, 20 May 2026 01:41:38 +0200 Subject: [PATCH 1/3] tests: pin G2 list-item attribute continuation behavior Adds failing tests describing the target rule: a {...} line on an indented continuation attaches to the
  • only when it is the last content line of the item. If another block follows it in the same item, the {...} reverts to a standard djot block-attribute for that following block and the list is NOT terminated. Two regression guards (last-line and blank-line/loose) already pass. The three new mid-item continuation tests fail against current master and will be made green in the next commit. --- tests/TestCase/DjotConverterTest.php | 71 ++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/tests/TestCase/DjotConverterTest.php b/tests/TestCase/DjotConverterTest.php index 20d75fae..37ca1abe 100644 --- a/tests/TestCase/DjotConverterTest.php +++ b/tests/TestCase/DjotConverterTest.php @@ -1030,6 +1030,77 @@ public function testTaskListItemAttributes(): void $this->assertStringContainsString('checked=""', $result); } + public function testListItemAttributesFollowedByBlockquoteStaysInItem(): void + { + // G2: a {...} line followed by more content within the same item + // must NOT terminate the list. The {...} reverts to a normal + // block-attribute for the following blockquote inside the item. + $djot = "- item\n {.x}\n > quote\n"; + + $result = $this->converter->convert($djot); + + $this->assertStringContainsString('