extIsekaiWidgetsCache->get('extraFonts', INF, []); $content = $text = $parser->recursiveTagParse($text, $frame); if (!isset($params['name']) || 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; } $existsFonts = $parser->extIsekaiWidgetsCache->get('extraFonts', INF, []); 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' ]; } }