fix: bd5babfa29
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Baoshuo Ren 2022-10-11 16:15:14 +08:00
parent d41fd4d818
commit f77f8a0a03
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

View File

@ -22,7 +22,7 @@ return function ($type) {
echo "Processing blog $id...\n"; echo "Processing blog $id...\n";
if ($type == 'blog') { if ($type == 'B') {
$dom = new DOMDocument; $dom = new DOMDocument;
$dom->loadHTML(mb_convert_encoding($parsedown->text($content_md), 'HTML-ENTITIES', 'UTF-8')); $dom->loadHTML(mb_convert_encoding($parsedown->text($content_md), 'HTML-ENTITIES', 'UTF-8'));
$elements = $dom->getElementsByTagName('table'); $elements = $dom->getElementsByTagName('table');
@ -39,7 +39,7 @@ return function ($type) {
} else { } else {
$content = $purifier->purify($content); $content = $purifier->purify($content);
} }
} elseif ($type == 'slide') { } elseif ($type == 'S') {
$content_array = yaml_parse($content_md); $content_array = yaml_parse($content_md);
if ($content_array === false || !is_array($content_array)) { if ($content_array === false || !is_array($content_array)) {
continue; continue;
@ -59,7 +59,6 @@ return function ($type) {
}; };
$config = array(); $config = array();
$content = '';
foreach ($content_array as $slide_name => $slide_content) { foreach ($content_array as $slide_name => $slide_content) {
if (is_array($slide_content) && is_array($slide_content['config'])) { if (is_array($slide_content) && is_array($slide_content['config'])) {
foreach (array('theme') as $config_key) { foreach (array('theme') as $config_key) {