修复自定义字体不显示的问题

master
落雨楓 5 days ago
parent a75e7c4ede
commit d88517db7a

@ -14,7 +14,7 @@ class ExtraFontWidget {
$existsFonts = [];
}
$content = $text = $parser->recursiveTagParseFully($text, $frame);
$content = $text = trim($parser->recursiveTagParseFully($text, $frame));
if (empty($params['name'])) {
return '<span class="error">' . wfMessage('isekai-font-error-invalid-params')->parse() . '</span>' . $content;
}
@ -35,11 +35,8 @@ class ExtraFontWidget {
}
$fontId = $existsFonts[$fontName];
return [
Html::rawElement('span', [
'class' => 'isekai-extra-font font-' . $fontId,
], $content),
"markerType" => 'nowiki'
];
return Html::openElement('span', [
'class' => 'isekai-extra-font font-' . $fontId,
]) . $content . Html::closeElement('span');
}
}

Loading…
Cancel
Save