From 3689db480d480633be32cb15ae779fcbb8cd306f Mon Sep 17 00:00:00 2001 From: Lex Lim Date: Tue, 22 Nov 2022 11:27:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=BF=9B=E5=8C=96=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- includes/InformationWidget.php | 4 ++-- includes/Widgets.php | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/InformationWidget.php b/includes/InformationWidget.php index 8e2d3a4..bdfb34f 100644 --- a/includes/InformationWidget.php +++ b/includes/InformationWidget.php @@ -76,14 +76,14 @@ class InformationWidget { foreach ($dataMap as $information) { if ($information['type'] === 'pair') { $stringBuilder[] = $information['label'] . $sep . - Utils::makeParagraph($parser->recursiveTagParse($information['text'], $frame), false, true); + Utils::makeParagraph($information['text'], false, true); } } return [implode('', $stringBuilder), 'markerType' => 'nowiki']; } public static function buildTable(\Parser $parser, \PPFrame $frame, array $dataMap, $title, $picture, $float) { - + } /** diff --git a/includes/Widgets.php b/includes/Widgets.php index 5b9cd5b..5cd102a 100644 --- a/includes/Widgets.php +++ b/includes/Widgets.php @@ -27,6 +27,8 @@ class Widgets { $parser->setHook('details', [Html5Widget::class, 'createDetails']); $parser->setHook('summary', [Html5Widget::class, 'createSummary']); + $parser->setFunctionHook('information', [InformationWidget::class, 'create'], SFH_OBJECT_ARGS); + return true; }