From 776e45473cc29e2e0e5b919f9cc0645b7c18b1cd Mon Sep 17 00:00:00 2001 From: joyqi Date: Wed, 2 Aug 2017 11:11:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3contents=E8=A1=A8=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E6=97=B6=E7=9A=84=E6=95=B0=E6=8D=AE=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E4=B8=BAlongtext=20=E4=BF=AE=E5=A4=8DHyperDown=E7=9A=84?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E8=A7=A3=E6=9E=90=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/js/hyperdown.js | 2 +- install/Mysql.sql | 2 +- var/HyperDown.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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];