From 3ed995778da6e880853fd2714a01a595182eb474 Mon Sep 17 00:00:00 2001 From: brettp Date: Wed, 27 Apr 2011 20:43:58 +0000 Subject: Updated markdown to add support for === instead of just ### for headers. Added upstream warning. git-svn-id: http://code.elgg.org/elgg/trunk@9035 36083f99-b078-4883-b0ff-0f9b5a30f544 --- vendors/markdown/UPSTREAM_WARNING | 5 +++++ vendors/markdown/markdown.php | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 vendors/markdown/UPSTREAM_WARNING (limited to 'vendors/markdown') diff --git a/vendors/markdown/UPSTREAM_WARNING b/vendors/markdown/UPSTREAM_WARNING new file mode 100644 index 000000000..d0a664f2a --- /dev/null +++ b/vendors/markdown/UPSTREAM_WARNING @@ -0,0 +1,5 @@ +This file has been modified from its upstream. When upgrading, be sure to check the following mods: + +* Headers can be created with =, ==, etc instead of just #, ##. +* @todo Autolink (f|ht)tp(s)?://link.com. +* @todo GFM improvement for newlines: http://github.github.com/github-flavored-markdown/ \ No newline at end of file diff --git a/vendors/markdown/markdown.php b/vendors/markdown/markdown.php index ee3dddbf9..3f1f3a715 100755 --- a/vendors/markdown/markdown.php +++ b/vendors/markdown/markdown.php @@ -2246,12 +2246,13 @@ class MarkdownExtra_Parser extends Markdown_Parser { # ... # ###### Header 6 {#header2} # + # @note Added for Elgg: You can use = in place of hashes for atx-style. $text = preg_replace_callback('{ - ^(\#{1,6}) # $1 = string of #\'s + ^([\#=]{1,6}) # $1 = string of #\'s [ ]* (.+?) # $2 = Header text [ ]* - \#* # optional closing #\'s (not counted) + [\#=]* # optional closing #\'s (not counted) (?:[ ]+\{\#([-_:a-zA-Z0-9]+)\})? # id attribute [ ]* \n+ -- cgit v1.2.3