修复信息框的空行

master
落雨楓 2 months ago
parent d6ea7e190a
commit f5a063dc93

@ -7,7 +7,7 @@ use PPFrame;
class InformationWidget { class InformationWidget {
public static function parseContent($content, $dataMap, $title) { public static function parseContent($content, $dataMap, $title) {
$lines = explode("\n", str_replace("\r\n", "\n", $content)); $lines = explode("\n", str_replace("\r\n", "\n", trim($content)));
$prevDataKey = null; $prevDataKey = null;
$finalData = []; $finalData = [];
@ -215,9 +215,9 @@ class InformationWidget {
case 'text': case 'text':
return static::buildText($parser, $frame, $dataMap, $title, $picture, $float); return static::buildText($parser, $frame, $dataMap, $title, $picture, $float);
case 'infobox': case 'infobox':
return static::buildInfoBox($parser, $frame, $dataMap, $title, $picture, $float);
default: default:
return '<span class="error">' . wfMessage('isekai-information-error-invalid-type')->parse() . '</span>'; return static::buildInfoBox($parser, $frame, $dataMap, $title, $picture, $float);
// return '<span class="error">' . wfMessage('isekai-information-error-invalid-type')->parse() . '</span>';
} }
} }
} }
Loading…
Cancel
Save