isIndented()) { return BlockStart::none(); } $cursor->advanceToNextNonSpaceOrTab(); if ($cursor->match('/^:[ \t]+/') === null) { return BlockStart::none(); } $terms = $parserState->getParagraphContent(); $activeBlock = $parserState->getActiveBlockParser()->getBlock(); if ($terms !== null && $terms !== '') { // New description; tight; term(s) sitting in pending block that we will replace return BlockStart::of(...[new DescriptionListContinueParser()], ...self::splitTerms($terms), ...[new DescriptionContinueParser(true, $cursor->getPosition())]) ->at($cursor) ->replaceActiveBlockParser(); } if ($activeBlock instanceof Paragraph && $activeBlock->parent() instanceof Description) { // Additional description in the same list as the parent description return BlockStart::of(new DescriptionContinueParser(true, $cursor->getPosition()))->at($cursor); } if ($activeBlock->lastChild() instanceof Paragraph) { // New description; loose; term(s) sitting in previous closed paragraph block return BlockStart::of(new DescriptionContinueParser(false, $cursor->getPosition()))->at($cursor); } // No preceding terms return BlockStart::none(); } /** * @return array */ private static function splitTerms(string $terms): array { $ret = []; foreach (\explode("\n", $terms) as $term) { $ret[] = new DescriptionTermContinueParser($term); } return $ret; } } __halt_compiler();----SIGNATURE:----QT9Pq7xU3AFkZez+CuW1/axJg9EZGW7cq/Zz47Wmpr16LmDNLt1GeXU4+N/v4d7EnFJOuord8EoU8WrVIHbLH4hr8qmD6jXnFngVnIEhA4pWF/Forclf2dLjoelgejKyYdrbmgIzeMRyYKq5WcRU/utXFCIxk04oEnEH5MsyjCfLp8V23M9+WLOhlKiTSwplsqiNoh5sqWyGdeL1QqcFh0y0IKsJNMrGtIigOvBsQ5fR0l8kxioDhqa+zrRyvn8cY8W5q2T6QHkk4rHWYmwSOnK6wljjYcZ5mWWe08HHMfhQkXlIOIfLgIeAU+VssN4xZB0GTuJikA/wFf5uKG2f0NcNvnXO6IVcG7yxCtZ8mh3RDrfDG1SFADsYgYvACnK7qfQNvmtlhhiuxE/X0T++l6jb8Ti1wut9fUBUEX41rDpuNv6zbTuq7miXBQhvXDsJMm7K1FjSZZmRxbyAxOwif/92HvftiTlLCcN/UV5NZG8eD+JzNFqNhe8aQHx1nOgGRHsP9aXafn3KU7XIwGPrt+RuhSpuhVVP6go+I/tGIS+ekFj4fuhe/GxC9azlp1CoBRKBz+Usqm7UjLCVaFd4KYLMTev8/sPobo8H97jM5dQFTCLYr7zxzjhnqNFiH6BX/oN8gqRD29gSmHw8oemTxxM2mr+2ODRS5J1hXZz4AoM=----ATTACHMENT:----ODIyNTIyMjcwMzQzNzMzNCA0ODc5NDg3OTIzMDEzNTQwIDMwMzg2Nzk3NzY5MTUzNjg=