diff --git a/admin/js/hyperdown.js b/admin/js/hyperdown.js index 5226c3b9..46430d4e 100644 --- a/admin/js/hyperdown.js +++ b/admin/js/hyperdown.js @@ -399,7 +399,7 @@ if (block != null) { block = block.slice(0); } - if (!!(matches = line.match(/^(\s*)(~|`){3,}([^`~]*)$/i))) { + if (!!(matches = line.match(/^(\s*)(~{3,}|`{3,})([^`~]*)$/i))) { if (this.isBlock('code')) { isAfterList = block[3][2]; if (isAfterList) { diff --git a/install/Mysql.sql b/install/Mysql.sql index 78f2ad6a..d6dd0607 100644 --- a/install/Mysql.sql +++ b/install/Mysql.sql @@ -49,7 +49,7 @@ CREATE TABLE `typecho_contents` ( `slug` varchar(200) default NULL, `created` int(10) unsigned default '0', `modified` int(10) unsigned default '0', - `text` text, + `text` longtext, `order` int(10) unsigned default '0', `authorId` int(10) unsigned default '0', `template` varchar(32) default NULL, diff --git a/var/HyperDown.php b/var/HyperDown.php index a3af0321..ea84a7a4 100644 --- a/var/HyperDown.php +++ b/var/HyperDown.php @@ -522,7 +522,7 @@ class HyperDown $block = $this->getBlock(); // code block is special - if (preg_match("/^(\s*)(~|`){3,}([^`~]*)$/i", $line, $matches)) { + if (preg_match("/^(\s*)(~{3,}|`{3,})([^`~]*)$/i", $line, $matches)) { if ($this->isBlock('code')) { $isAfterList = $block[3][2];