getOutput(); $existsFonts = $out->getExtensionData('IsekaiWidgets.extraFonts'); if (!$existsFonts) { $existsFonts = []; } $content = $text = $parser->recursiveTagParseFully($text, $frame); if (empty($params['name'])) { return '' . wfMessage('isekai-font-error-invalid-params')->parse() . '' . $content; } $fontName = 'extra-' . $params['name']; if (preg_match('/[`~!@#$%^&*()+=<>?:"{}|,.\/;\'\\\\\[\]]\r\n/', $fontName)) { return '' . wfMessage('isekai-font-error-font-name-invalid')->parse() . '' . $content; } if (!isset($existsFonts[$fontName])) { return '' . wfMessage('isekai-font-error-font-not-imported', $params['name'])->parse() . '' . $content; } $fontId = $existsFonts[$fontName]; return [ Html::rawElement('span', [ 'class' => 'isekai-extra-font font-' . $fontId, ], $content), "markerType" => 'nowiki' ]; } }