From 455351df9eb1d0a3860f65188009c77d558f4837 Mon Sep 17 00:00:00 2001 From: Allan Date: Thu, 28 Oct 2021 11:21:29 +0800 Subject: [PATCH 1/3] Resolve conflicts with WP Githuber MD --- functions.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/functions.php b/functions.php index b8bc8e5..25040ef 100755 --- a/functions.php +++ b/functions.php @@ -183,6 +183,11 @@ function dangopress_esc_html($content) function dangopress_esc_callback($matches) { $tag_open = $matches[1]; + # 前面函数的正则表达式有点粗暴,可能会导致存在多个class, + # 所以,如果存在多个就把前面加的class删掉。 + if ( substr_count($tag_open, "class=") > 1 ){ + $tag_open = str_replace(' class="prettyprint" ', " ", $tag_open); + } $content = $matches[2]; $tag_close = $matches[3]; //$content = htmlspecialchars($content, ENT_NOQUOTES, bloginfo('charset')); From 64a92d48fe8b5063b476318f1dd0c27745652f71 Mon Sep 17 00:00:00 2001 From: Allan Date: Thu, 28 Oct 2021 11:23:17 +0800 Subject: [PATCH 2/3] Fixed issue where TOC cannot be displayed in WP Githuber MD. --- inc/content.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/content.php b/inc/content.php index 19c3bbc..6c72aff 100755 --- a/inc/content.php +++ b/inc/content.php @@ -1,6 +1,6 @@
-
+
Date: Thu, 28 Oct 2021 21:25:12 +0800 Subject: [PATCH 3/3] Fix: Uncaught TypeError: $.viewImage is not a function --- footer.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/footer.php b/footer.php index aa23d38..18b9928 100755 --- a/footer.php +++ b/footer.php @@ -41,7 +41,7 @@