composer update

This commit is contained in:
Marcel Kapfer (mmk2410) 2016-12-30 00:04:12 +01:00
parent 9ac51e0523
commit 623395064f
279 changed files with 4458 additions and 16328 deletions

View file

@ -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

28
vendor/erusev/parsedown/Parsedown.php vendored Executable file → Normal file
View file

@ -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',

View file

@ -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. Its 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. Its 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.

View file

@ -12,7 +12,10 @@
"homepage": "http://erusev.com"
}
],
"require": {
"php": ">=5.3.0"
},
"autoload": {
"psr-0": {"Parsedown": ""}
}
}
}

View file

@ -139,7 +139,7 @@ EXPECTED_HTML;
public function testLateStaticBinding()
{
include 'test/TestParsedown.php';
include __DIR__ . '/TestParsedown.php';
$parsedown = Parsedown::instance();
$this->assertInstanceOf('Parsedown', $parsedown);

View file

@ -8,6 +8,6 @@
<li>two</li>
</ol>
<p>large numbers:</p>
<ol>
<ol start="123">
<li>one</li>
</ol>