From: Tim Düsterhus Date: Tue, 21 Feb 2017 17:31:50 +0000 (+0100) Subject: Update composer dependencies X-Git-Tag: 3.1.0_Alpha_1~608 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8b4b0e9c46d224c0deec9f59133b1195494dd84e;p=GitHub%2FWoltLab%2FWCF.git Update composer dependencies --- diff --git a/wcfsetup/install/files/lib/system/api/composer.lock b/wcfsetup/install/files/lib/system/api/composer.lock index 79be2bfd28..3a1a627b5d 100644 --- a/wcfsetup/install/files/lib/system/api/composer.lock +++ b/wcfsetup/install/files/lib/system/api/composer.lock @@ -9,18 +9,21 @@ "packages": [ { "name": "erusev/parsedown", - "version": "1.6.0", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/erusev/parsedown.git", - "reference": "3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7" + "reference": "20ff8bbb57205368b4b42d094642a3e52dac85fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/erusev/parsedown/zipball/3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7", - "reference": "3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7", + "url": "https://api.github.com/repos/erusev/parsedown/zipball/20ff8bbb57205368b4b42d094642a3e52dac85fb", + "reference": "20ff8bbb57205368b4b42d094642a3e52dac85fb", "shasum": "" }, + "require": { + "php": ">=5.3.0" + }, "type": "library", "autoload": { "psr-0": { @@ -44,7 +47,7 @@ "markdown", "parser" ], - "time": "2015-10-04 16:44:32" + "time": "2016-11-02 15:56:58" }, { "name": "ezyang/htmlpurifier", diff --git a/wcfsetup/install/files/lib/system/api/composer/installed.json b/wcfsetup/install/files/lib/system/api/composer/installed.json index 6d47f57a97..5ccc02e0ca 100644 --- a/wcfsetup/install/files/lib/system/api/composer/installed.json +++ b/wcfsetup/install/files/lib/system/api/composer/installed.json @@ -1,45 +1,4 @@ [ - { - "name": "erusev/parsedown", - "version": "1.6.0", - "version_normalized": "1.6.0.0", - "source": { - "type": "git", - "url": "https://github.com/erusev/parsedown.git", - "reference": "3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/erusev/parsedown/zipball/3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7", - "reference": "3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7", - "shasum": "" - }, - "time": "2015-10-04 16:44:32", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-0": { - "Parsedown": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Emanuil Rusev", - "email": "hello@erusev.com", - "homepage": "http://erusev.com" - } - ], - "description": "Parser for Markdown.", - "homepage": "http://parsedown.org", - "keywords": [ - "markdown", - "parser" - ] - }, { "name": "pelago/emogrifier", "version": "V1.1.0", @@ -147,5 +106,49 @@ "keywords": [ "html" ] + }, + { + "name": "erusev/parsedown", + "version": "1.6.1", + "version_normalized": "1.6.1.0", + "source": { + "type": "git", + "url": "https://github.com/erusev/parsedown.git", + "reference": "20ff8bbb57205368b4b42d094642a3e52dac85fb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/erusev/parsedown/zipball/20ff8bbb57205368b4b42d094642a3e52dac85fb", + "reference": "20ff8bbb57205368b4b42d094642a3e52dac85fb", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2016-11-02 15:56:58", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-0": { + "Parsedown": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Emanuil Rusev", + "email": "hello@erusev.com", + "homepage": "http://erusev.com" + } + ], + "description": "Parser for Markdown.", + "homepage": "http://parsedown.org", + "keywords": [ + "markdown", + "parser" + ] } ] diff --git a/wcfsetup/install/files/lib/system/api/erusev/parsedown/.travis.yml b/wcfsetup/install/files/lib/system/api/erusev/parsedown/.travis.yml index 5df49dcb3c..fa5ca981cc 100644 --- a/wcfsetup/install/files/lib/system/api/erusev/parsedown/.travis.yml +++ b/wcfsetup/install/files/lib/system/api/erusev/parsedown/.travis.yml @@ -1,6 +1,7 @@ language: php php: + - 7.1 - 7.0 - 5.6 - 5.5 @@ -12,5 +13,4 @@ php: matrix: fast_finish: true allow_failures: - - php: 7.0 - php: hhvm-nightly diff --git a/wcfsetup/install/files/lib/system/api/erusev/parsedown/Parsedown.php b/wcfsetup/install/files/lib/system/api/erusev/parsedown/Parsedown.php index c8c92a3924..4737eee2a2 100644 --- a/wcfsetup/install/files/lib/system/api/erusev/parsedown/Parsedown.php +++ b/wcfsetup/install/files/lib/system/api/erusev/parsedown/Parsedown.php @@ -115,7 +115,7 @@ class Parsedown # Blocks # - private function lines(array $lines) + protected function lines(array $lines) { $CurrentBlock = null; @@ -175,7 +175,7 @@ class Parsedown } else { - if (method_exists($this, 'block'.$CurrentBlock['type'].'Complete')) + if ($this->isBlockCompletable($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->isBlockContinuable($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->isBlockCompletable($CurrentBlock['type'])) { $CurrentBlock = $this->{'block'.$CurrentBlock['type'].'Complete'}($CurrentBlock); } @@ -278,6 +278,16 @@ class Parsedown return $markup; } + protected function isBlockContinuable($Type) + { + return method_exists($this, 'block'.$Type.'Continue'); + } + + protected function isBlockCompletable($Type) + { + return method_exists($this, 'block'.$Type.'Complete'); + } + # # Code @@ -505,6 +515,16 @@ class Parsedown ), ); + if($name === 'ol') + { + $listStart = stristr($matches[0], '.', true); + + if($listStart !== '1') + { + $Block['element']['attributes'] = array('start' => $listStart); + } + } + $Block['li'] = array( 'name' => 'li', 'handler' => 'li', diff --git a/wcfsetup/install/files/lib/system/api/erusev/parsedown/README.md b/wcfsetup/install/files/lib/system/api/erusev/parsedown/README.md index 6f9f649856..790778728b 100644 --- a/wcfsetup/install/files/lib/system/api/erusev/parsedown/README.md +++ b/wcfsetup/install/files/lib/system/api/erusev/parsedown/README.md @@ -1,3 +1,5 @@ +> You might also like [Caret](http://caret.io?ref=parsedown) - our Markdown editor for Mac / Windows / Linux. + ## Parsedown [![Build Status](https://img.shields.io/travis/erusev/parsedown/master.svg?style=flat-square)](https://travis-ci.org/erusev/parsedown) @@ -12,10 +14,11 @@ Better Markdown Parser in PHP ### Features +* One File * Super Fast -* [GitHub flavored](https://help.github.com/articles/github-flavored-markdown) * Extensible -* Tested in 5.3 to 5.6 +* [GitHub flavored](https://help.github.com/articles/github-flavored-markdown) +* Tested in 5.3 to 7.1 and in HHVM * [Markdown Extra extension](https://github.com/erusev/parsedown-extra) ### Installation @@ -36,7 +39,7 @@ More examples in [the wiki](https://github.com/erusev/parsedown/wiki/) and in [t **How does Parsedown work?** -It tries to read Markdown like a human. First, it looks at the lines. It’s interested in how the lines start. This helps it recognise blocks. It knows, for example, that if a line start with a `-` then it perhaps belong to a list. Once it recognises the blocks, it continues to the content. As it reads, it watches out for special characters. This helps it recognise inline elements (or inlines). +It tries to read Markdown like a human. First, it looks at the lines. It’s interested in how the lines start. This helps it recognise blocks. It knows, for example, that if a line starts with a `-` then perhaps it belongs to a list. Once it recognises the blocks, it continues to the content. As it reads, it watches out for special characters. This helps it recognise inline elements (or inlines). We call this approach "line based". We believe that Parsedown is the first Markdown parser to use it. Since the release of Parsedown, other developers have used the same approach to develop other Markdown parsers in PHP and in other languages. @@ -46,12 +49,8 @@ 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://packagist.org/packages/erusev/parsedown/dependents). **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. diff --git a/wcfsetup/install/files/lib/system/api/erusev/parsedown/composer.json b/wcfsetup/install/files/lib/system/api/erusev/parsedown/composer.json index 1439b824dd..28145af68c 100644 --- a/wcfsetup/install/files/lib/system/api/erusev/parsedown/composer.json +++ b/wcfsetup/install/files/lib/system/api/erusev/parsedown/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 +} diff --git a/wcfsetup/install/files/lib/system/api/erusev/parsedown/test/ParsedownTest.php b/wcfsetup/install/files/lib/system/api/erusev/parsedown/test/ParsedownTest.php index c922ab1f2b..323dace86f 100644 --- a/wcfsetup/install/files/lib/system/api/erusev/parsedown/test/ParsedownTest.php +++ b/wcfsetup/install/files/lib/system/api/erusev/parsedown/test/ParsedownTest.php @@ -139,7 +139,7 @@ EXPECTED_HTML; public function testLateStaticBinding() { - include 'test/TestParsedown.php'; + include __DIR__ . '/TestParsedown.php'; $parsedown = Parsedown::instance(); $this->assertInstanceOf('Parsedown', $parsedown); diff --git a/wcfsetup/install/files/lib/system/api/erusev/parsedown/test/data/ordered_list.html b/wcfsetup/install/files/lib/system/api/erusev/parsedown/test/data/ordered_list.html index b6c5216ca0..c4a69dbe63 100644 --- a/wcfsetup/install/files/lib/system/api/erusev/parsedown/test/data/ordered_list.html +++ b/wcfsetup/install/files/lib/system/api/erusev/parsedown/test/data/ordered_list.html @@ -8,6 +8,6 @@
  • two
  • large numbers:

    -
      +
      1. one
      \ No newline at end of file