From cee9c87d9edaadb70ae5dbc2e81298f5c4bdd4f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=81=E5=AE=81?= Date: Mon, 28 Apr 2014 00:31:09 +0800 Subject: [PATCH] fix #228 disable fenced figures feature by MarkdownExtraExtended --- var/MarkdownExtraExtended.php | 2 ++ var/Typecho/Common.php | 2 +- var/Widget/Plugins/List.php | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/var/MarkdownExtraExtended.php b/var/MarkdownExtraExtended.php index 95daed81..96caad9b 100644 --- a/var/MarkdownExtraExtended.php +++ b/var/MarkdownExtraExtended.php @@ -3137,9 +3137,11 @@ class MarkdownExtraExtended extends MarkdownExtra { protected $block_tags_re = 'figure|figcaption|p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|form|fieldset|iframe|hr|legend'; public function __construct() { + /* $this->block_gamut += array( "doFencedFigures" => 7 ); + */ $this->document_gamut += array( "doClearBreaks" => 100 diff --git a/var/Typecho/Common.php b/var/Typecho/Common.php index 3642f327..e608113c 100644 --- a/var/Typecho/Common.php +++ b/var/Typecho/Common.php @@ -1002,7 +1002,7 @@ EOF; } if (function_exists('finfo_open')) { - $fInfo = @finfo_open(FILEINFO_MIME); + $fInfo = @finfo_open(FILEINFO_MIME_TYPE); if (false !== $fInfo) { $mimeType = finfo_file($fInfo, $fileName); diff --git a/var/Widget/Plugins/List.php b/var/Widget/Plugins/List.php index ca192cc6..d57f8035 100644 --- a/var/Widget/Plugins/List.php +++ b/var/Widget/Plugins/List.php @@ -106,7 +106,7 @@ class Widget_Plugins_List extends Typecho_Widget } } - if (!is_bool($this->parameter->activated) || $info['activated'] == $this->parameter->activated) { + if ($info['activated'] == $this->parameter->activated) { $this->push($info); } }