From 3e5a01637bf51f071cb89c52b64f43345834cf43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=81=E5=AE=81?= Date: Fri, 26 Sep 2014 21:40:55 +0800 Subject: [PATCH] update to CommonMark support --- admin/editor-js.php | 4 +- admin/js/pagedown.js | 72 +- admin/js/stmd.js | 1547 ++++++++++++++ admin/js/typecho.js | 39 +- tools/Makefile | 17 +- tools/transfer.php | 107 + var/CommonMark/CommonMarkConverter.php | 39 + var/CommonMark/DocParser.php | 595 ++++++ var/CommonMark/Element/BlockElement.php | 478 +++++ var/CommonMark/Element/InlineCreator.php | 125 ++ var/CommonMark/Element/InlineElement.php | 114 ++ .../Element/InlineElementInterface.php | 56 + var/CommonMark/HtmlRenderer.php | 261 +++ var/CommonMark/InlineParser.php | 827 ++++++++ var/CommonMark/Reference/Reference.php | 92 + var/CommonMark/Reference/ReferenceMap.php | 66 + var/CommonMark/Util/ArrayCollection.php | 225 ++ var/CommonMark/Util/RegexHelper.php | 252 +++ var/ParsedownExtra.php | 1822 ----------------- var/Widget/Abstract/Comments.php | 5 +- var/Widget/Abstract/Contents.php | 5 +- 21 files changed, 4858 insertions(+), 1890 deletions(-) create mode 100755 admin/js/stmd.js create mode 100644 tools/transfer.php create mode 100644 var/CommonMark/CommonMarkConverter.php create mode 100644 var/CommonMark/DocParser.php create mode 100644 var/CommonMark/Element/BlockElement.php create mode 100644 var/CommonMark/Element/InlineCreator.php create mode 100644 var/CommonMark/Element/InlineElement.php create mode 100644 var/CommonMark/Element/InlineElementInterface.php create mode 100644 var/CommonMark/HtmlRenderer.php create mode 100644 var/CommonMark/InlineParser.php create mode 100644 var/CommonMark/Reference/Reference.php create mode 100644 var/CommonMark/Reference/ReferenceMap.php create mode 100644 var/CommonMark/Util/ArrayCollection.php create mode 100644 var/CommonMark/Util/RegexHelper.php delete mode 100644 var/ParsedownExtra.php diff --git a/admin/editor-js.php b/admin/editor-js.php index 7b89afc5..3602e793 100644 --- a/admin/editor-js.php +++ b/admin/editor-js.php @@ -1,6 +1,7 @@ markdown): ?> +