From d88517db7acddc8c59b50bb52543584fb0d6da4e Mon Sep 17 00:00:00 2001 From: Lex Lim Date: Sun, 26 Jan 2025 11:40:08 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E5=AD=97=E4=BD=93=E4=B8=8D=E6=98=BE=E7=A4=BA=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- includes/ExtraFontWidget.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) 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'); } }