From f77f8a0a0308149ef38800423408716f2e6b6246 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Tue, 11 Oct 2022 16:15:14 +0800 Subject: [PATCH] fix: bd5babfa293b440af714b1781e9e6425a04b2b90 --- web/app/upgrade/3_parsedown/upgrade.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/web/app/upgrade/3_parsedown/upgrade.php b/web/app/upgrade/3_parsedown/upgrade.php index 74a197e..946d7e0 100644 --- a/web/app/upgrade/3_parsedown/upgrade.php +++ b/web/app/upgrade/3_parsedown/upgrade.php @@ -22,7 +22,7 @@ return function ($type) { echo "Processing blog $id...\n"; - if ($type == 'blog') { + if ($type == 'B') { $dom = new DOMDocument; $dom->loadHTML(mb_convert_encoding($parsedown->text($content_md), 'HTML-ENTITIES', 'UTF-8')); $elements = $dom->getElementsByTagName('table'); @@ -39,7 +39,7 @@ return function ($type) { } else { $content = $purifier->purify($content); } - } elseif ($type == 'slide') { + } elseif ($type == 'S') { $content_array = yaml_parse($content_md); if ($content_array === false || !is_array($content_array)) { continue; @@ -59,7 +59,6 @@ return function ($type) { }; $config = array(); - $content = ''; foreach ($content_array as $slide_name => $slide_content) { if (is_array($slide_content) && is_array($slide_content['config'])) { foreach (array('theme') as $config_key) {