diff --git a/includes/ExtraFontWidget.php b/includes/ExtraFontWidget.php index f8b99e9..f93a4dd 100644 --- a/includes/ExtraFontWidget.php +++ b/includes/ExtraFontWidget.php @@ -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 '' . wfMessage('isekai-font-error-invalid-params')->parse() . '' . $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'); } }