$text, 'node' => $node, // there are \b boundaries on either side, and first/last characters // are word characters. 'badPrefix' => /* RegExp */ '/\w$/uD', 'badSuffix' => /* RegExp */ '/^\w/u' ] ); } /** * @param string $text * @param DOMElement $node * @param stdClass $dataParsoid * @param Env $env * @param array $opts * @return ?MagicLinkText */ protected static function fromSelSerImpl( string $text, DOMElement $node, stdClass $dataParsoid, Env $env, array $opts ) { $stx = $dataParsoid->stx ?? null; if ( $stx === 'magiclink' ) { return new MagicLinkText( $text, $node ); } return null; } }