Somehow nigger rigged composer into working on windows, quite satisfying.

This commit is contained in:
flash 2015-03-08 06:47:05 +01:00
parent 8865584174
commit b9cc427560
119 changed files with 2761 additions and 7 deletions

View file

@ -1,6 +1,7 @@
{ {
"require": { "require": {
"twig/twig": "~1.18", "twig/twig": "~1.18",
"phpmailer/phpmailer": "~5.2" "phpmailer/phpmailer": "~5.2",
"flashwave/parsedown": "~1.5"
} }
} }

41
_sakura/composer.lock generated
View file

@ -4,8 +4,47 @@
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"hash": "4c0c667622cb35a3e07590b42e249382", "hash": "d7cfeaae365470b6fd55d79713328996",
"packages": [ "packages": [
{
"name": "flashwave/parsedown",
"version": "1.5.1",
"source": {
"type": "git",
"url": "https://github.com/flashii/parsedown.git",
"reference": "9da19c1108c39df9b42adc42e39b8371070652d0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/flashii/parsedown/zipball/9da19c1108c39df9b42adc42e39b8371070652d0",
"reference": "9da19c1108c39df9b42adc42e39b8371070652d0",
"shasum": ""
},
"type": "library",
"autoload": {
"psr-0": {
"Parsedown": ""
}
},
"notification-url": "http://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"
],
"time": "2015-01-24 13:01:47"
},
{ {
"name": "phpmailer/phpmailer", "name": "phpmailer/phpmailer",
"version": "v5.2.9", "version": "v5.2.9",

View file

@ -4,4 +4,4 @@
require_once __DIR__ . '/composer' . '/autoload_real.php'; require_once __DIR__ . '/composer' . '/autoload_real.php';
return ComposerAutoloaderInit224408571366fb34dc1e58de2b2f832a::getLoader(); return ComposerAutoloaderInite72692c6cecce78e8b57d01284372c37::getLoader();

View file

@ -7,4 +7,5 @@ $baseDir = dirname($vendorDir);
return array( return array(
'Twig_' => array($vendorDir . '/twig/twig/lib'), 'Twig_' => array($vendorDir . '/twig/twig/lib'),
'Parsedown' => array($vendorDir . '/flashwave/parsedown'),
); );

View file

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer // autoload_real.php @generated by Composer
class ComposerAutoloaderInit224408571366fb34dc1e58de2b2f832a class ComposerAutoloaderInite72692c6cecce78e8b57d01284372c37
{ {
private static $loader; private static $loader;
@ -19,9 +19,9 @@ class ComposerAutoloaderInit224408571366fb34dc1e58de2b2f832a
return self::$loader; return self::$loader;
} }
spl_autoload_register(array('ComposerAutoloaderInit224408571366fb34dc1e58de2b2f832a', 'loadClassLoader'), true, true); spl_autoload_register(array('ComposerAutoloaderInite72692c6cecce78e8b57d01284372c37', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(); self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit224408571366fb34dc1e58de2b2f832a', 'loadClassLoader')); spl_autoload_unregister(array('ComposerAutoloaderInite72692c6cecce78e8b57d01284372c37', 'loadClassLoader'));
$map = require __DIR__ . '/autoload_namespaces.php'; $map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) { foreach ($map as $namespace => $path) {
@ -44,7 +44,7 @@ class ComposerAutoloaderInit224408571366fb34dc1e58de2b2f832a
} }
} }
function composerRequire224408571366fb34dc1e58de2b2f832a($file) function composerRequiree72692c6cecce78e8b57d01284372c37($file)
{ {
require $file; require $file;
} }

View file

@ -112,5 +112,46 @@
} }
], ],
"description": "PHPMailer is a full-featured email creation and transfer class for PHP" "description": "PHPMailer is a full-featured email creation and transfer class for PHP"
},
{
"name": "flashwave/parsedown",
"version": "1.5.1",
"version_normalized": "1.5.1.0",
"source": {
"type": "git",
"url": "https://github.com/flashii/parsedown.git",
"reference": "9da19c1108c39df9b42adc42e39b8371070652d0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/flashii/parsedown/zipball/9da19c1108c39df9b42adc42e39b8371070652d0",
"reference": "9da19c1108c39df9b42adc42e39b8371070652d0",
"shasum": ""
},
"time": "2015-01-24 13:01:47",
"type": "library",
"installation-source": "source",
"autoload": {
"psr-0": {
"Parsedown": ""
}
},
"notification-url": "http://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"
]
} }
] ]

View file

@ -0,0 +1,10 @@
language: php
php:
- 5.6
- 5.5
- 5.4
- 5.3
- 5.2
- hhvm

View file

@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2013 Emanuil Rusev, erusev.com
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,48 @@
## Parsedown
Better Markdown Parser in PHP
[[ demo ]](http://parsedown.org/demo)
### Features
* [Fast](http://parsedown.org/speed)
* [Consistent](http://parsedown.org/consistency)
* [GitHub flavored](https://help.github.com/articles/github-flavored-markdown)
* [Tested](http://parsedown.org/tests/) in PHP 5.2, 5.3, 5.4, 5.5, 5.6 and [hhvm](http://www.hhvm.com/)
* [Extensible](https://github.com/erusev/parsedown/wiki/Writing-Extensions)
* [Markdown Extra extension](https://github.com/erusev/parsedown-extra)
### Installation
Include `Parsedown.php` or install [the composer package](https://packagist.org/packages/erusev/parsedown).
### Example
``` php
$Parsedown = new Parsedown();
echo $Parsedown->text('Hello _Parsedown_!'); # prints: <p>Hello <em>Parsedown</em>!</p>
```
More examples in [the wiki](https://github.com/erusev/parsedown/wiki/Usage) and in [this video tutorial](http://youtu.be/wYZBY8DEikI).
### Questions
**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).
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.
**Is it compliant with CommonMark?**
It passes most of the CommonMark tests. Most of the tests that don't pass deal with cases that are quite uncommon. Still, as CommonMark matures, compliance should improve.
**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).
**How can I help?**
Use it, star it, share it and if you feel generous, [donate some money](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=528P3NZQMP8N2).

View file

@ -0,0 +1,18 @@
{
"name": "erusev/parsedown",
"description": "Parser for Markdown.",
"keywords": ["markdown", "parser"],
"homepage": "http://parsedown.org",
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Emanuil Rusev",
"email": "hello@erusev.com",
"homepage": "http://erusev.com"
}
],
"autoload": {
"psr-0": {"Parsedown": ""}
}
}

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="test/bootstrap.php" colors="true">
<testsuites>
<testsuite>
<file>test/ParsedownTest.php</file>
</testsuite>
</testsuites>
</phpunit>

View file

@ -0,0 +1,74 @@
<?php
/**
* Test Parsedown against the CommonMark spec.
*
* Some code based on the original JavaScript test runner by jgm.
*
* @link http://commonmark.org/ CommonMark
* @link http://git.io/8WtRvQ JavaScript test runner
*/
class CommonMarkTest extends PHPUnit_Framework_TestCase
{
const SPEC_URL = 'https://raw.githubusercontent.com/jgm/stmd/master/spec.txt';
/**
* @dataProvider data
* @param $section
* @param $markdown
* @param $expectedHtml
*/
function test_($section, $markdown, $expectedHtml)
{
$Parsedown = new Parsedown();
$Parsedown->setUrlsLinked(false);
$actualHtml = $Parsedown->text($markdown);
$actualHtml = $this->normalizeMarkup($actualHtml);
$this->assertEquals($expectedHtml, $actualHtml);
}
function data()
{
$spec = file_get_contents(self::SPEC_URL);
$spec = strstr($spec, '<!-- END TESTS -->', true);
$tests = array();
$currentSection = '';
preg_replace_callback(
'/^\.\n([\s\S]*?)^\.\n([\s\S]*?)^\.$|^#{1,6} *(.*)$/m',
function($matches) use ( & $tests, & $currentSection, & $testCount) {
if (isset($matches[3]) and $matches[3]) {
$currentSection = $matches[3];
} else {
$testCount++;
$markdown = $matches[1];
$markdown = preg_replace('/→/', "\t", $markdown);
$expectedHtml = $matches[2];
$expectedHtml = $this->normalizeMarkup($expectedHtml);
$tests []= array(
$currentSection, # section
$markdown, # markdown
$expectedHtml, # html
);
}
},
$spec
);
return $tests;
}
private function normalizeMarkup($markup)
{
$markup = preg_replace("/\n+/", "\n", $markup);
$markup = preg_replace('/^\s+/m', '', $markup);
$markup = preg_replace('/^((?:<[\w]+>)+)\n/m', '$1', $markup);
$markup = preg_replace('/\n((?:<\/[\w]+>)+)$/m', '$1', $markup);
$markup = trim($markup);
return $markup;
}
}

View file

@ -0,0 +1,139 @@
<?php
class ParsedownTest extends PHPUnit_Framework_TestCase
{
final function __construct($name = null, array $data = array(), $dataName = '')
{
$this->dirs = $this->initDirs();
$this->Parsedown = $this->initParsedown();
parent::__construct($name, $data, $dataName);
}
private $dirs, $Parsedown;
/**
* @return array
*/
protected function initDirs()
{
$dirs []= dirname(__FILE__).'/data/';
return $dirs;
}
/**
* @return Parsedown
*/
protected function initParsedown()
{
$Parsedown = new Parsedown();
return $Parsedown;
}
/**
* @dataProvider data
* @param $test
* @param $dir
*/
function test_($test, $dir)
{
$markdown = file_get_contents($dir . $test . '.md');
$expectedMarkup = file_get_contents($dir . $test . '.html');
$expectedMarkup = str_replace("\r\n", "\n", $expectedMarkup);
$expectedMarkup = str_replace("\r", "\n", $expectedMarkup);
$actualMarkup = $this->Parsedown->text($markdown);
$this->assertEquals($expectedMarkup, $actualMarkup);
}
function data()
{
$data = array();
foreach ($this->dirs as $dir)
{
$Folder = new DirectoryIterator($dir);
foreach ($Folder as $File)
{
/** @var $File DirectoryIterator */
if ( ! $File->isFile())
{
continue;
}
$filename = $File->getFilename();
$extension = pathinfo($filename, PATHINFO_EXTENSION);
if ($extension !== 'md')
{
continue;
}
$basename = $File->getBasename('.md');
if (file_exists($dir . $basename . '.html'))
{
$data []= array($basename, $dir);
}
}
}
return $data;
}
public function test_no_markup()
{
$markdownWithHtml = <<<MARKDOWN_WITH_MARKUP
<div>_content_</div>
sparse:
<div>
<div class="inner">
_content_
</div>
</div>
paragraph
<style type="text/css">
p {
color: red;
}
</style>
comment
<!-- html comment -->
MARKDOWN_WITH_MARKUP;
$expectedHtml = <<<EXPECTED_HTML
<p>&lt;div&gt;<em>content</em>&lt;/div&gt;</p>
<p>sparse:</p>
<p>&lt;div&gt;
&lt;div class=&quot;inner&quot;&gt;
<em>content</em>
&lt;/div&gt;
&lt;/div&gt;</p>
<p>paragraph</p>
<p>&lt;style type=&quot;text/css&quot;&gt;
p {
color: red;
}
&lt;/style&gt;</p>
<p>comment</p>
<p>&lt;!-- html comment --&gt;</p>
EXPECTED_HTML;
$parsedownWithNoMarkup = new Parsedown();
$parsedownWithNoMarkup->setMarkupEscaped(true);
$this->assertEquals($expectedHtml, $parsedownWithNoMarkup->text($markdownWithHtml));
}
}

View file

@ -0,0 +1,3 @@
<?php
include 'Parsedown.php';

View file

@ -0,0 +1,18 @@
<table>
<thead>
<tr>
<th>header 1</th>
<th>header 2</th>
</tr>
</thead>
<tbody>
<tr>
<td>cell 1.1</td>
<td>cell 1.2</td>
</tr>
<tr>
<td>cell 2.1</td>
<td>cell 2.2</td>
</tr>
</tbody>
</table>

View file

@ -0,0 +1,4 @@
| header 1 | header 2 |
| -------- | -------- |
| cell 1.1 | cell 1.2 |
| cell 2.1 | cell 2.2 |

View file

@ -0,0 +1,21 @@
<table>
<thead>
<tr>
<th style="text-align: left;">header 1</th>
<th style="text-align: center;">header 2</th>
<th style="text-align: right;">header 2</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">cell 1.1</td>
<td style="text-align: center;">cell 1.2</td>
<td style="text-align: right;">cell 1.3</td>
</tr>
<tr>
<td style="text-align: left;">cell 2.1</td>
<td style="text-align: center;">cell 2.2</td>
<td style="text-align: right;">cell 2.3</td>
</tr>
</tbody>
</table>

View file

@ -0,0 +1,4 @@
| header 1 | header 2 | header 2 |
| :------- | :------: | -------: |
| cell 1.1 | cell 1.2 | cell 1.3 |
| cell 2.1 | cell 2.2 | cell 2.3 |

View file

@ -0,0 +1,9 @@
<h1>h1</h1>
<h2>h2</h2>
<h3>h3</h3>
<h4>h4</h4>
<h5>h5</h5>
<h6>h6</h6>
<p>####### not a heading</p>
<h1>closed h1</h1>
<p>#</p>

View file

@ -0,0 +1,17 @@
# h1
## h2
### h3
#### h4
##### h5
###### h6
####### not a heading
# closed h1 #
#

View file

@ -0,0 +1 @@
<p><a href="http://example.com">http://example.com</a></p>

View file

@ -0,0 +1 @@
<http://example.com>

View file

@ -0,0 +1,12 @@
<div>_content_</div>
<p>paragraph</p>
<div>
<div class="inner">
_content_
</div>
</div>
<style type="text/css">
p {color: #789;}
</style>
<div>
<a href="/">home</a></div>

View file

@ -0,0 +1,16 @@
<div>_content_</div>
paragraph
<div>
<div class="inner">
_content_
</div>
</div>
<style type="text/css">
p {color: #789;}
</style>
<div>
<a href="/">home</a></div>

View file

@ -0,0 +1,8 @@
<pre><code>&lt;?php
$message = 'Hello World!';
echo $message;</code></pre>
<hr />
<pre><code>&gt; not a quote
- not a list item
[not a reference]: http://foo.com</code></pre>

View file

@ -0,0 +1,10 @@
<?php
$message = 'Hello World!';
echo $message;
---
> not a quote
- not a list item
[not a reference]: http://foo.com

View file

@ -0,0 +1,6 @@
<p>a <code>code span</code></p>
<p><code>this is also a codespan</code> trailing text</p>
<p><code>and look at this one!</code></p>
<p>single backtick in a code span: <code>`</code></p>
<p>backtick-delimited string in a code span: <code>`foo`</code></p>
<p><code>sth `` sth</code></p>

View file

@ -0,0 +1,11 @@
a `code span`
`this is also a codespan` trailing text
`and look at this one!`
single backtick in a code span: `` ` ``
backtick-delimited string in a code span: `` `foo` ``
`sth `` sth`

View file

@ -0,0 +1,9 @@
<blockquote>
<h2>header</h2>
<p>paragraph</p>
<ul>
<li>li</li>
</ul>
<hr />
<p>paragraph</p>
</blockquote>

View file

@ -0,0 +1,10 @@
> header
> ------
>
> paragraph
>
> - li
>
> ---
>
> paragraph

View file

@ -0,0 +1,2 @@
<p><em><code>code</code></em> <strong><code>code</code></strong></p>
<p><em><code>code</code><strong><code>code</code></strong><code>code</code></em></p>

View file

@ -0,0 +1,4 @@
_`code`_ __`code`__
*`code`**`code`**`code`*

View file

@ -0,0 +1,12 @@
<ul>
<li>
<p>paragraph</p>
<p>paragraph</p>
</li>
<li>
<p>paragraph</p>
<blockquote>
<p>quote</p>
</blockquote>
</li>
</ul>

View file

@ -0,0 +1,7 @@
- paragraph
paragraph
- paragraph
> quote

View file

@ -0,0 +1,12 @@
<ul>
<li>li
<ul>
<li>li
<ul>
<li>li</li>
<li>li</li>
</ul></li>
<li>li</li>
</ul></li>
<li>li</li>
</ul>

View file

@ -0,0 +1,6 @@
- li
- li
- li
- li
- li
- li

View file

@ -0,0 +1,8 @@
<p><strong><em>em strong</em></strong></p>
<p><strong><em>em strong</em> strong</strong></p>
<p><strong>strong <em>em strong</em></strong></p>
<p><strong>strong <em>em strong</em> strong</strong></p>
<p><strong><em>em strong</em></strong></p>
<p><strong><em>em strong</em> strong</strong></p>
<p><strong>strong <em>em strong</em></strong></p>
<p><strong>strong <em>em strong</em> strong</strong></p>

View file

@ -0,0 +1,15 @@
___em strong___
___em strong_ strong__
__strong _em strong___
__strong _em strong_ strong__
***em strong***
***em strong* strong**
**strong *em strong***
**strong *em strong* strong**

View file

@ -0,0 +1 @@
<p>my email is <a href="mailto:me@example.com">me@example.com</a></p>

View file

@ -0,0 +1 @@
my email is <me@example.com>

View file

@ -0,0 +1,8 @@
<p><em>underscore</em>, <em>asterisk</em>, <em>one two</em>, <em>three four</em>, <em>a</em>, <em>b</em></p>
<p><strong>strong</strong> and <em>em</em> and <strong>strong</strong> and <em>em</em></p>
<p><em>line
line
line</em></p>
<p>this_is_not_an_emphasis</p>
<p>an empty emphasis __ ** is not an emphasis</p>
<p>*mixed *<em>double and</em> single asterisk** spans</p>

View file

@ -0,0 +1,13 @@
_underscore_, *asterisk*, _one two_, *three four*, _a_, *b*
**strong** and *em* and **strong** and *em*
_line
line
line_
this_is_not_an_emphasis
an empty emphasis __ ** is not an emphasis
*mixed **double and* single asterisk** spans

View file

@ -0,0 +1,6 @@
<p>escaped *emphasis*.</p>
<p><code>escaped \*emphasis\* in a code span</code></p>
<pre><code>escaped \*emphasis\* in a code block</code></pre>
<p>\ ` * _ { } [ ] ( ) > # + - . !</p>
<p><em>one_two</em> <strong>one_two</strong></p>
<p><em>one*two</em> <strong>one*two</strong></p>

View file

@ -0,0 +1,11 @@
escaped \*emphasis\*.
`escaped \*emphasis\* in a code span`
escaped \*emphasis\* in a code block
\\ \` \* \_ \{ \} \[ \] \( \) \> \# \+ \- \. \!
_one\_two_ __one\_two__
*one\*two* **one\*two**

View file

@ -0,0 +1,6 @@
<pre><code>&lt;?php
$message = 'fenced code block';
echo $message;</code></pre>
<pre><code>tilde</code></pre>
<pre><code class="language-php">echo 'language identifier';</code></pre>

View file

@ -0,0 +1,14 @@
```
<?php
$message = 'fenced code block';
echo $message;
```
~~~
tilde
~~~
```php
echo 'language identifier';
```

View file

@ -0,0 +1,5 @@
<hr />
<hr />
<hr />
<hr />
<hr />

View file

@ -0,0 +1,9 @@
---
- - -
- - -
***
___

View file

@ -0,0 +1,5 @@
<!-- single line -->
<p>paragraph</p>
<!--
multiline -->
<p>paragraph</p>

View file

@ -0,0 +1,8 @@
<!-- single line -->
paragraph
<!--
multiline -->
paragraph

View file

@ -0,0 +1 @@
<p>&amp; &copy; &#123;</p>

View file

@ -0,0 +1 @@
&amp; &copy; &#123;

View file

@ -0,0 +1,2 @@
<p><img src="/md.png" alt="Markdown Logo" /></p>
<p>![missing reference]</p>

View file

@ -0,0 +1,5 @@
![Markdown Logo][image]
[image]: /md.png
![missing reference]

View file

@ -0,0 +1 @@
<p><img src="/md.png" alt="alt" title="title" /></p>

View file

@ -0,0 +1 @@
![alt](/md.png "title")

View file

@ -0,0 +1,4 @@
<p>an <a href="http://example.com">implicit</a> reference link</p>
<p>an <a href="http://example.com">implicit</a> reference link with an empty link definition</p>
<p>an <a href="http://example.com">implicit</a> reference link followed by <a href="http://cnn.com">another</a></p>
<p>an <a href="http://example.com" title="Example">explicit</a> reference link with a title</p>

View file

@ -0,0 +1,13 @@
an [implicit] reference link
[implicit]: http://example.com
an [implicit][] reference link with an empty link definition
an [implicit][] reference link followed by [another][]
[another]: http://cnn.com
an [explicit][example] reference link with a title
[example]: http://example.com "Example"

View file

@ -0,0 +1,6 @@
<p><a href="http://example.com">link</a></p>
<p><a href="/url-(parentheses)">link</a> with parentheses in URL </p>
<p>(<a href="/index.php">link</a>) in parentheses</p>
<p><a href="http://example.com"><code>link</code></a></p>
<p><a href="http://example.com"><img src="http://parsedown.org/md.png" alt="MD Logo" /></a></p>
<p><a href="http://example.com"><img src="http://parsedown.org/md.png" alt="MD Logo" /> and text</a></p>

View file

@ -0,0 +1,11 @@
[link](http://example.com)
[link](/url-(parentheses)) with parentheses in URL
([link](/index.php)) in parentheses
[`link`](http://example.com)
[![MD Logo](http://parsedown.org/md.png)](http://example.com)
[![MD Logo](http://parsedown.org/md.png) and text](http://example.com)

View file

@ -0,0 +1,4 @@
<p><a href="http://example.com" title="Title">single quotes</a></p>
<p><a href="http://example.com" title="Title">double quotes</a></p>
<p><a href="http://example.com" title="2 Words">space</a></p>
<p><a href="http://example.com/url-(parentheses)" title="Title">parentheses</a></p>

View file

@ -0,0 +1,7 @@
[single quotes](http://example.com 'Title')
[double quotes](http://example.com "Title")
[space](http://example.com "2 Words")
[parentheses](http://example.com/url-(parentheses) "Title")

View file

@ -0,0 +1 @@
<p><a href="http://example.com" title="Example">single quotes</a> and <a href="http://example.com" title="Example">double quotes</a></p>

View file

@ -0,0 +1 @@
[single quotes](http://example.com 'Example') and [double quotes](http://example.com "Example")

View file

@ -0,0 +1,6 @@
<blockquote>
<p>quote
the rest of it</p>
<p>another paragraph
the rest of it</p>
</blockquote>

View file

@ -0,0 +1,5 @@
> quote
the rest of it
> another paragraph
the rest of it

View file

@ -0,0 +1,4 @@
<ul>
<li>li
the rest of it</li>
</ul>

View file

@ -0,0 +1,2 @@
- li
the rest of it

View file

@ -0,0 +1,2 @@
<p>line<br />
line</p>

View file

@ -0,0 +1,2 @@
line
line

View file

@ -0,0 +1,7 @@
<ul>
<li>
<p>li</p>
<p>line
line</p>
</li>
</ul>

View file

@ -0,0 +1,4 @@
- li
line
line

View file

@ -0,0 +1,10 @@
<div>
_parent_
<div>
_child_
</div>
<pre>
_adopted child_
</pre>
</div>
<p><em>outside</em></p>

View file

@ -0,0 +1,11 @@
<div>
_parent_
<div>
_child_
</div>
<pre>
_adopted child_
</pre>
</div>
_outside_

View file

@ -0,0 +1,13 @@
<ol>
<li>one</li>
<li>two</li>
</ol>
<p>repeating numbers:</p>
<ol>
<li>one</li>
<li>two</li>
</ol>
<p>large numbers:</p>
<ol>
<li>one</li>
</ol>

View file

@ -0,0 +1,11 @@
1. one
2. two
repeating numbers:
1. one
1. two
large numbers:
123. one

View file

@ -0,0 +1,12 @@
<p>paragraph</p>
<ul>
<li>li</li>
<li>li</li>
</ul>
<p>paragraph</p>
<ul>
<li>
<p>li</p>
</li>
<li>li</li>
</ul>

View file

@ -0,0 +1,9 @@
paragraph
- li
- li
paragraph
* li
* li

View file

@ -0,0 +1,2 @@
<p><a href="http://example.com" title="example title">double quotes</a> and <a href="http://example.com" title="example title">single quotes</a> and <a href="http://example.com" title="example title">parentheses</a></p>
<p>[invalid title]: <a href="http://example.com">http://example.com</a> example title</p>

View file

@ -0,0 +1,6 @@
[double quotes] and [single quotes] and [parentheses]
[double quotes]: http://example.com "example title"
[single quotes]: http://example.com 'example title'
[parentheses]: http://example.com (example title)
[invalid title]: http://example.com example title

View file

@ -0,0 +1,12 @@
<hr>
<p>paragraph</p>
<hr/>
<p>paragraph</p>
<hr />
<p>paragraph</p>
<hr class="foo" id="bar" />
<p>paragraph</p>
<hr class="foo" id="bar"/>
<p>paragraph</p>
<hr class="foo" id="bar" >
<p>paragraph</p>

View file

@ -0,0 +1,12 @@
<hr>
paragraph
<hr/>
paragraph
<hr />
paragraph
<hr class="foo" id="bar" />
paragraph
<hr class="foo" id="bar"/>
paragraph
<hr class="foo" id="bar" >
paragraph

View file

@ -0,0 +1,9 @@
<ul>
<li>
<p>li</p>
<ul>
<li>li</li>
<li>li</li>
</ul>
</li>
</ul>

View file

@ -0,0 +1,4 @@
- li
- li
- li

View file

@ -0,0 +1,5 @@
<h1>h1</h1>
<h2>h2</h2>
<h2>single character</h2>
<p>not a header</p>
<hr />

View file

@ -0,0 +1,12 @@
h1
==
h2
--
single character
-
not a header
------------

View file

@ -0,0 +1,11 @@
<blockquote>
<p>quote</p>
</blockquote>
<p>indented:</p>
<blockquote>
<p>quote</p>
</blockquote>
<p>no space after <code>&gt;</code>:</p>
<blockquote>
<p>quote</p>
</blockquote>

View file

@ -0,0 +1,7 @@
> quote
indented:
> quote
no space after `>`:
>quote

View file

@ -0,0 +1,37 @@
<table>
<thead>
<tr>
<th>header 1</th>
<th>header 2</th>
</tr>
</thead>
<tbody>
<tr>
<td>cell 1.1</td>
<td>cell 1.2</td>
</tr>
<tr>
<td>cell 2.1</td>
<td>cell 2.2</td>
</tr>
</tbody>
</table>
<hr />
<table>
<thead>
<tr>
<th style="text-align: left;">header 1</th>
<th>header 2</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">cell 1.1</td>
<td>cell 1.2</td>
</tr>
<tr>
<td style="text-align: left;">cell 2.1</td>
<td>cell 2.2</td>
</tr>
</tbody>
</table>

View file

@ -0,0 +1,11 @@
header 1 | header 2
-------- | --------
cell 1.1 | cell 1.2
cell 2.1 | cell 2.2
---
header 1 | header 2
:------- | --------
cell 1.1 | cell 1.2
cell 2.1 | cell 2.2

View file

@ -0,0 +1,5 @@
<p>an <b>important</b> <a href=''>link</a></p>
<p>broken<br/>
line</p>
<p><b>inline tag</b> at the beginning</p>
<p><span><a href="http://example.com">http://example.com</a></span></p>

View file

@ -0,0 +1,8 @@
an <b>important</b> <a href=''>link</a>
broken<br/>
line
<b>inline tag</b> at the beginning
<span>http://example.com</span>

View file

@ -0,0 +1,7 @@
<ul>
<li>
<p>li</p>
</li>
<li>li</li>
<li>li</li>
</ul>

View file

@ -0,0 +1,4 @@
- li
- li
- li

View file

@ -0,0 +1,8 @@
<div>
line 1
line 2
line 3
line 4
</div>

View file

@ -0,0 +1,8 @@
<div>
line 1
line 2
line 3
line 4
</div>

View file

@ -0,0 +1,15 @@
<ul>
<li>
<p>li</p>
</li>
<li>li</li>
</ul>
<hr />
<ul>
<li>
<p>li</p>
<ul>
<li>indented li</li>
</ul>
</li>
</ul>

View file

@ -0,0 +1,9 @@
- li
- li
---
- li
- indented li

View file

@ -0,0 +1,6 @@
<p>AT&amp;T has an ampersand in their name</p>
<p>this &amp; that</p>
<p>4 &lt; 5 and 6 &gt; 5</p>
<p><a href="http://example.com/autolink?a=1&amp;b=2">http://example.com/autolink?a=1&amp;b=2</a></p>
<p><a href="/script?a=1&amp;b=2">inline link</a></p>
<p><a href="http://example.com/?a=1&amp;b=2">reference link</a></p>

Some files were not shown because too many files have changed in this diff Show more