block = new ListItem($listData); } public function getBlock(): ListItem { return $this->block; } public function isContainer(): bool { return true; } public function canContain(AbstractBlock $childBlock): bool { if ($this->hadBlankLine) { // We saw a blank line in this list item, that means the list block is loose. // // spec: if any of its constituent list items directly contain two block-level elements with a blank line // between them $parent = $this->block->parent(); if ($parent instanceof ListBlock) { $parent->setTight(false); } } return true; } public function tryContinue(Cursor $cursor, BlockContinueParserInterface $activeBlockParser): ?BlockContinue { if ($cursor->isBlank()) { if ($this->block->firstChild() === null) { // Blank line after empty list item return BlockContinue::none(); } $activeBlock = $activeBlockParser->getBlock(); // If the active block is a code block, blank lines in it should not affect if the list is tight. $this->hadBlankLine = $activeBlock instanceof Paragraph || $activeBlock instanceof ListItem; $cursor->advanceToNextNonSpaceOrTab(); return BlockContinue::at($cursor); } $contentIndent = $this->block->getListData()->markerOffset + $this->getBlock()->getListData()->padding; if ($cursor->getIndent() >= $contentIndent) { $cursor->advanceBy($contentIndent, true); return BlockContinue::at($cursor); } // Note: We'll hit this case for lazy continuation lines, they will get added later. return BlockContinue::none(); } } __halt_compiler();----SIGNATURE:----GPKoVl99DO2jFULM+AzGaksOmq3A0qJ/lUQgQvS+b5ngcNoPYQZMms+hh31/gZCEqxBnOX5SX2+zXtExyyNQCvjb7EJ4WhdzuF92Zv0b4tw5qQpejUu4Rllwg0eD0fJpUid9LC417Og4210jHpucBDvaEzZxG29Fi7YYsiyu1/MK3Ahf9VYlDztVFU9YY3akZt+SrqpZ0afFZZY0rvsxirkXpUHGpuYpJvMgnJPsyjlXw2fdf/SIQaytLnvANH6X0+laREuJLMx+6Oyqya9dzW3WIC4tErx+Uii9QvvVyDxXQs7JnSpsg+fh/GrYkmuMpwLROq8/08bK6tDuO6s+G2upE+Hgl8IuJC4cFTfjj5OwLlAgtayI+jiLbkCx1+x/cagIVPiwPJRMsJICfNnJC3G71dk2xvVloVZ1E0Vu4MXB0RT1uldR4T4FO1ezPNZMoIxxXEXG1DaehlmhL3G8VBSQgDG0zd8wxCleHQge9jQgA8w8GwtmIbkzSR7JRjuZVeH8o7o18+X1G5GvHUuwrj5wPOaH9yYZXvw4vPKD3QnpsLpQxkNktyJ2BXAO3d6M3DeKXzs7OloAkoHJRQ1tfggD9wtvinhkWue3PirpclXMaXy0n5bbyr9l5yh9LmbJiFHj8jpExS9BXL8O3IsHRwXApQHgWWlBhWZPu9R20I0=----ATTACHMENT:----NjI5MTU0OTgwMzU2MjgzNyA0MDg3NjY1MDk4NTY4NDggMjQ3NTEwMjY4NTgzNzYyMg==