From e603c2378dc2c4b4eb09f717f93870ad91d6849b Mon Sep 17 00:00:00 2001 From: Jesse Donat Date: Tue, 20 Oct 2015 15:16:36 -0500 Subject: [PATCH 01/21] Parsedown library shouldn't be executable --- Parsedown.php | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 Parsedown.php diff --git a/Parsedown.php b/Parsedown.php old mode 100755 new mode 100644 From 9928c933d8950964b0111a41a9a54c0b4d122814 Mon Sep 17 00:00:00 2001 From: Thomas Breuss Date: Sun, 25 Oct 2015 13:33:13 +0100 Subject: [PATCH 02/21] Add Herbie CMS to "Who uses it?" --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6f9f649..36254d0 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ It passes most of the CommonMark tests. Most of the tests that don't pass deal w **Who uses it?** -[phpDocumentor](http://www.phpdoc.org/), [October CMS](http://octobercms.com/), [Bolt CMS](http://bolt.cm/), [Kirby CMS](http://getkirby.com/), [Grav CMS](http://getgrav.org/), [Statamic CMS](http://www.statamic.com/), [RaspberryPi.org](http://www.raspberrypi.org/) and [more](https://www.versioneye.com/php/erusev:parsedown/references). +[phpDocumentor](http://www.phpdoc.org/), [October CMS](http://octobercms.com/), [Bolt CMS](http://bolt.cm/), [Kirby CMS](http://getkirby.com/), [Grav CMS](http://getgrav.org/), [Statamic CMS](http://www.statamic.com/), [Herbie CMS](http://www.getherbie.org/), [RaspberryPi.org](http://www.raspberrypi.org/) and [more](https://www.versioneye.com/php/erusev:parsedown/references). **How can I help?** From c8072a1987210bdf26074ad46e8ba61d5aec9b03 Mon Sep 17 00:00:00 2001 From: Emanuil Rusev Date: Sat, 31 Oct 2015 00:33:11 +0200 Subject: [PATCH 03/21] add link to caret.io in readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 36254d0..6a48bf6 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +> I have also been working on a [Markdown editor for the desktop](http://caret.io) - I'd appreciate it if you had a look at it and let me know what you think. + ## Parsedown [![Build Status](https://img.shields.io/travis/erusev/parsedown/master.svg?style=flat-square)](https://travis-ci.org/erusev/parsedown) From 93d77b0b47d08745a58427785c75d43fa907a656 Mon Sep 17 00:00:00 2001 From: Emanuil Rusev Date: Sat, 31 Oct 2015 00:35:04 +0200 Subject: [PATCH 04/21] improve readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6a48bf6..1dd063e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -> I have also been working on a [Markdown editor for the desktop](http://caret.io) - I'd appreciate it if you had a look at it and let me know what you think. +> I'm also working on a [Markdown editor for the desktop](http://caret.io) - I'd appreciate it if you had a look at it and let me know what you think. ## Parsedown From 15d56cdd27a0d3baf2f1bb3c6d881fb9fa8df55c Mon Sep 17 00:00:00 2001 From: Emanuil Rusev Date: Sat, 31 Oct 2015 00:37:38 +0200 Subject: [PATCH 05/21] improve readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1dd063e..509772c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -> I'm also working on a [Markdown editor for the desktop](http://caret.io) - I'd appreciate it if you had a look at it and let me know what you think. +> I'm also working on a [Markdown editor for the desktop](http://caret.io?ref=parsedown) - I'd appreciate it if you had a look at it and let me know what you think. ## Parsedown From aa63058a889b1d9b48cd87fa85b943fb9869ba9c Mon Sep 17 00:00:00 2001 From: Emanuil Rusev Date: Sat, 31 Oct 2015 00:38:24 +0200 Subject: [PATCH 06/21] improve readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 509772c..6241cf0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -> I'm also working on a [Markdown editor for the desktop](http://caret.io?ref=parsedown) - I'd appreciate it if you had a look at it and let me know what you think. +> I'm also working on a [Markdown editor for the desktop](http://caret.io?ref=parsedown) - I'll appreciate it if you have a look at it and tell me what you think. ## Parsedown From 003af2649974dcf52537b8a05446e2d1241c6ca6 Mon Sep 17 00:00:00 2001 From: Emanuil Rusev Date: Sat, 31 Oct 2015 00:45:21 +0200 Subject: [PATCH 07/21] improve readme --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index 6241cf0..a00dd4f 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,3 @@ It passes most of the CommonMark tests. Most of the tests that don't pass deal w **How can I help?** Use it, star it, share it and if you feel generous, [donate](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=528P3NZQMP8N2). - ---- - -You might also like [Caret](http://caret.io) - our Markdown editor for the desktop. From 50ac4a06e851aa838f1fe9a7d6815f38b1544e24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Make=C5=A1?= Date: Sat, 31 Oct 2015 01:55:49 +0100 Subject: [PATCH 08/21] remove PHP 7.0 from allow failures in tests + improve readme --- .travis.yml | 1 - README.md | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5df49dc..256dcf1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,5 +12,4 @@ php: matrix: fast_finish: true allow_failures: - - php: 7.0 - php: hhvm-nightly diff --git a/README.md b/README.md index a00dd4f..f42d553 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Better Markdown Parser in PHP * Super Fast * [GitHub flavored](https://help.github.com/articles/github-flavored-markdown) * Extensible -* Tested in 5.3 to 5.6 +* Tested in 5.3 to 7.0 and in HHVM * [Markdown Extra extension](https://github.com/erusev/parsedown-extra) ### Installation From 5a4ff5d1894dcf7a4d218ad5b0c29260c12951ae Mon Sep 17 00:00:00 2001 From: Emanuil Rusev Date: Sat, 31 Oct 2015 15:49:56 +0200 Subject: [PATCH 09/21] improve readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a00dd4f..22b8254 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -> I'm also working on a [Markdown editor for the desktop](http://caret.io?ref=parsedown) - I'll appreciate it if you have a look at it and tell me what you think. +> I also work on a [Markdown editor for the desktop](http://caret.io?ref=parsedown) - I'll appreciate it if you have a look at it and tell me what you think. ## Parsedown From 23d4544986877c8880e3dd4cdf846688694814e4 Mon Sep 17 00:00:00 2001 From: Emanuil Rusev Date: Sat, 31 Oct 2015 15:51:14 +0200 Subject: [PATCH 10/21] improve readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 22b8254..e83bd35 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -> I also work on a [Markdown editor for the desktop](http://caret.io?ref=parsedown) - I'll appreciate it if you have a look at it and tell me what you think. +> I also make a [Markdown editor for the desktop](http://caret.io?ref=parsedown) - I'll appreciate it if you have a look at it and tell me what you think. ## Parsedown From 6f23ec82036939ae011d8ca803d2632a4ce20877 Mon Sep 17 00:00:00 2001 From: Emanuil Rusev Date: Sat, 31 Oct 2015 15:52:07 +0200 Subject: [PATCH 11/21] improve readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e83bd35..08f0741 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -> I also make a [Markdown editor for the desktop](http://caret.io?ref=parsedown) - I'll appreciate it if you have a look at it and tell me what you think. +> I also make a [Markdown editor for the desktop](http://caret.io?ref=parsedown) - I'll appreciate it if you have a look at it and give me some feedback. ## Parsedown From f1fefc257c088d820375bbbd3fb0bb8f9914d2b3 Mon Sep 17 00:00:00 2001 From: Emanuil Rusev Date: Sat, 31 Oct 2015 16:13:42 +0200 Subject: [PATCH 12/21] improve readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 08f0741..75ec577 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -> I also make a [Markdown editor for the desktop](http://caret.io?ref=parsedown) - I'll appreciate it if you have a look at it and give me some feedback. +> You might also like [Caret](http://caret.io?ref=parsedown) - our Markdown editor for the Desktop. ## Parsedown From 97953b193eeee756c7eda64c6df5a0b44c5958ef Mon Sep 17 00:00:00 2001 From: Emanuil Rusev Date: Sat, 14 Nov 2015 09:52:07 +0200 Subject: [PATCH 13/21] add Grav CMS to: who uses it --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ab33506..24e217a 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ It passes most of the CommonMark tests. Most of the tests that don't pass deal w **Who uses it?** -[phpDocumentor](http://www.phpdoc.org/), [October CMS](http://octobercms.com/), [Bolt CMS](http://bolt.cm/), [Kirby CMS](http://getkirby.com/), [Grav CMS](http://getgrav.org/), [Statamic CMS](http://www.statamic.com/), [Herbie CMS](http://www.getherbie.org/), [RaspberryPi.org](http://www.raspberrypi.org/) and [more](https://www.versioneye.com/php/erusev:parsedown/references). +[phpDocumentor](http://www.phpdoc.org/), [October CMS](http://octobercms.com/), [Bolt CMS](http://bolt.cm/), [Kirby CMS](http://getkirby.com/), [Grav CMS](http://getgrav.org/), [Statamic CMS](http://www.statamic.com/), [Grav CMS](http://getgrav.org/), [Herbie CMS](http://www.getherbie.org/), [RaspberryPi.org](http://www.raspberrypi.org/) and [more](https://www.versioneye.com/php/erusev:parsedown/references). **How can I help?** From 3d7cdeec5f90a16934a2cfd35a089c78aa0e4816 Mon Sep 17 00:00:00 2001 From: Emanuil Rusev Date: Sat, 14 Nov 2015 09:54:17 +0200 Subject: [PATCH 14/21] remove duplicate item in: who uses it --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 24e217a..ab33506 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ It passes most of the CommonMark tests. Most of the tests that don't pass deal w **Who uses it?** -[phpDocumentor](http://www.phpdoc.org/), [October CMS](http://octobercms.com/), [Bolt CMS](http://bolt.cm/), [Kirby CMS](http://getkirby.com/), [Grav CMS](http://getgrav.org/), [Statamic CMS](http://www.statamic.com/), [Grav CMS](http://getgrav.org/), [Herbie CMS](http://www.getherbie.org/), [RaspberryPi.org](http://www.raspberrypi.org/) and [more](https://www.versioneye.com/php/erusev:parsedown/references). +[phpDocumentor](http://www.phpdoc.org/), [October CMS](http://octobercms.com/), [Bolt CMS](http://bolt.cm/), [Kirby CMS](http://getkirby.com/), [Grav CMS](http://getgrav.org/), [Statamic CMS](http://www.statamic.com/), [Herbie CMS](http://www.getherbie.org/), [RaspberryPi.org](http://www.raspberrypi.org/) and [more](https://www.versioneye.com/php/erusev:parsedown/references). **How can I help?** From 0f974bf34fdc420c3a7dc0a6c5c5fc620fa9dd89 Mon Sep 17 00:00:00 2001 From: Emanuil Rusev Date: Thu, 26 Nov 2015 15:08:28 +0200 Subject: [PATCH 15/21] improve readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ab33506..7e1f10e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -> You might also like [Caret](http://caret.io?ref=parsedown) - our Markdown editor for the Desktop. +> You might also like [Caret](http://caret.io?ref=parsedown) - our Markdown editor for Mac / Windows / Linux. ## Parsedown From b166cab9a252f4093af1f33cb178a86f6047d08a Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Thu, 17 Dec 2015 10:46:04 -0700 Subject: [PATCH 16/21] Make `lines` protected to allow for extendability --- Parsedown.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Parsedown.php b/Parsedown.php index c8c92a3..b0e7094 100644 --- a/Parsedown.php +++ b/Parsedown.php @@ -115,7 +115,7 @@ class Parsedown # Blocks # - private function lines(array $lines) + protected function lines(array $lines) { $CurrentBlock = null; From 5ad15b87faa2ab10f7cda7593e2e92696fafadd2 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Thu, 17 Dec 2015 10:46:44 -0700 Subject: [PATCH 17/21] Break out method_exists checks into extendable methods to allow for better pluggability --- Parsedown.php | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/Parsedown.php b/Parsedown.php index b0e7094..b04ee4a 100644 --- a/Parsedown.php +++ b/Parsedown.php @@ -175,7 +175,7 @@ class Parsedown } else { - if (method_exists($this, 'block'.$CurrentBlock['type'].'Complete')) + if ($this->isBlockCompleteable($CurrentBlock['type'])) { $CurrentBlock = $this->{'block'.$CurrentBlock['type'].'Complete'}($CurrentBlock); } @@ -216,7 +216,7 @@ class Parsedown $Block['identified'] = true; } - if (method_exists($this, 'block'.$blockType.'Continue')) + if ($this->isBlockContinueable($blockType)) { $Block['continuable'] = true; } @@ -245,7 +245,7 @@ class Parsedown # ~ - if (isset($CurrentBlock['continuable']) and method_exists($this, 'block'.$CurrentBlock['type'].'Complete')) + if (isset($CurrentBlock['continuable']) and $this->isBlockCompleteable($CurrentBlock['type'])) { $CurrentBlock = $this->{'block'.$CurrentBlock['type'].'Complete'}($CurrentBlock); } @@ -278,6 +278,19 @@ class Parsedown return $markup; } + # + # Allow for plugin extensibility + # + protected function isBlockContinueable($Type) + { + return method_exists($this, 'block'.$Type.'Continue'); + } + + protected function isBlockCompleteable($Type) + { + return method_exists($this, 'block'.$Type.'Complete'); + } + # # Code @@ -1521,8 +1534,8 @@ class Parsedown 'q', 'rt', 'ins', 'font', 'strong', 's', 'tt', 'sub', 'mark', 'u', 'xm', 'sup', 'nobr', - 'var', 'ruby', - 'wbr', 'span', - 'time', + 'var', 'ruby', + 'wbr', 'span', + 'time', ); } From 10a7ff776c3f16b1b3aa41c176c48150fc091065 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Thu, 17 Dec 2015 10:48:21 -0700 Subject: [PATCH 18/21] Left as-is --- Parsedown.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Parsedown.php b/Parsedown.php index b04ee4a..60d315f 100644 --- a/Parsedown.php +++ b/Parsedown.php @@ -1534,8 +1534,8 @@ class Parsedown 'q', 'rt', 'ins', 'font', 'strong', 's', 'tt', 'sub', 'mark', 'u', 'xm', 'sup', 'nobr', - 'var', 'ruby', - 'wbr', 'span', - 'time', + 'var', 'ruby', + 'wbr', 'span', + 'time', ); } From e7443a2bd868e78946ae6a01a1b07d477ce6f4cc Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Fri, 18 Dec 2015 20:45:14 -0700 Subject: [PATCH 19/21] Fixed really sorry spelling errors --- Parsedown.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Parsedown.php b/Parsedown.php index 60d315f..6ffb402 100644 --- a/Parsedown.php +++ b/Parsedown.php @@ -175,7 +175,7 @@ class Parsedown } else { - if ($this->isBlockCompleteable($CurrentBlock['type'])) + if ($this->isBlockCompletable($CurrentBlock['type'])) { $CurrentBlock = $this->{'block'.$CurrentBlock['type'].'Complete'}($CurrentBlock); } @@ -216,7 +216,7 @@ class Parsedown $Block['identified'] = true; } - if ($this->isBlockContinueable($blockType)) + if ($this->isBlockContinuable($blockType)) { $Block['continuable'] = true; } @@ -245,7 +245,7 @@ class Parsedown # ~ - if (isset($CurrentBlock['continuable']) and $this->isBlockCompleteable($CurrentBlock['type'])) + if (isset($CurrentBlock['continuable']) and $this->isBlockCompletable($CurrentBlock['type'])) { $CurrentBlock = $this->{'block'.$CurrentBlock['type'].'Complete'}($CurrentBlock); } @@ -281,12 +281,12 @@ class Parsedown # # Allow for plugin extensibility # - protected function isBlockContinueable($Type) + protected function isBlockContinuable($Type) { return method_exists($this, 'block'.$Type.'Continue'); } - protected function isBlockCompleteable($Type) + protected function isBlockCompletable($Type) { return method_exists($this, 'block'.$Type.'Complete'); } From 3d649081e58c9fed5ff11aeede1be2dd2e0ee153 Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Wed, 6 Jan 2016 19:44:53 +0100 Subject: [PATCH 20/21] Update composer.json requirements Fixes #374 --- composer.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 1439b82..28145af 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,10 @@ "homepage": "http://erusev.com" } ], + "require": { + "php": ">=5.3.0" + }, "autoload": { "psr-0": {"Parsedown": ""} } -} \ No newline at end of file +} From 9545a295cf4cfda6e728ebf0948a12bc5530e42d Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Thu, 7 Jan 2016 16:48:43 +0100 Subject: [PATCH 21/21] README.md: Add PHP 5.3+ requirement --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7e1f10e..7d72281 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Better Markdown Parser in PHP ### Installation -Include `Parsedown.php` or install [the composer package](https://packagist.org/packages/erusev/parsedown). +Include `Parsedown.php` or install [the composer package](https://packagist.org/packages/erusev/parsedown). Parsedown requires PHP 5.3+ ### Example