$text, 'node' => $node ] ); } /** * @param string $text * @param DOMElement $node * @param stdClass $dataParsoid * @param Env $env * @param array $opts * @return ?ExtLinkText */ protected static function fromSelSerImpl( string $text, DOMElement $node, stdClass $dataParsoid, Env $env, array $opts ): ?ExtLinkText { $type = $node->getAttribute( 'rel' ) ?? ''; $stx = $dataParsoid->stx ?? ''; if ( $type === 'mw:ExtLink' && !preg_match( '/^(simple|piped)$/D', $stx ) ) { return new ExtLinkText( $text, $node, $env->getSiteConfig(), $type ); } return null; } }