emitChunk( $this->getListBullets( $state, $node ), $node ); } $liHandler = static function ( $state, $text, $opts ) use ( $node ) { return $state->serializer->wteHandlers->liHandler( $node, $state, $text, $opts ); }; $state->singleLineContext->enforce(); $state->serializeChildren( $node, $liHandler ); $state->singleLineContext->pop(); return $node->nextSibling; } /** @inheritDoc */ public function before( Element $node, Node $otherNode, SerializerState $state ): array { return [ 'min' => 1, 'max' => 2 ]; } /** @inheritDoc */ public function after( Element $node, Node $otherNode, SerializerState $state ): array { if ( DOMCompat::nodeName( $otherNode ) === 'dd' && $otherNode instanceof Element // for static analyzers && ( DOMDataUtils::getDataParsoid( $otherNode )->stx ?? null ) === 'row' ) { return [ 'min' => 0, 'max' => 0 ]; } else { return $this->wtListEOL( $node, $otherNode ); } } /** @inheritDoc */ public function firstChild( Node $node, Node $otherNode, SerializerState $state ): array { if ( !DOMUtils::isList( $otherNode ) ) { return [ 'min' => 0, 'max' => 0 ]; } else { return []; } } }