修复信息框的空行

master
落雨楓 3 weeks ago
parent d6ea7e190a
commit f5a063dc93

@ -7,7 +7,7 @@ use PPFrame;
class InformationWidget {
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;
$finalData = [];
@ -215,9 +215,9 @@ class InformationWidget {
case 'text':
return static::buildText($parser, $frame, $dataMap, $title, $picture, $float);
case 'infobox':
return static::buildInfoBox($parser, $frame, $dataMap, $title, $picture, $float);
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