diff options
author | Philip Häusler <msquare@notrademark.de> | 2014-03-09 13:12:39 +0100 |
---|---|---|
committer | Philip Häusler <msquare@notrademark.de> | 2014-03-09 13:12:39 +0100 |
commit | 893bb5a9cf365c831e75fafc83dffdbced09a466 (patch) | |
tree | ef7a4f923ebb49a70697b0388af359b2b44b2109 /vendor | |
parent | 82c0d2acc24a0b19de246c4f2c3d37a8e197d11e (diff) |
added parsedown 0.9.0
Diffstat (limited to 'vendor')
90 files changed, 1709 insertions, 0 deletions
diff --git a/vendor/parsedown-0.9.0/.gitignore b/vendor/parsedown-0.9.0/.gitignore new file mode 100644 index 00000000..a7235d42 --- /dev/null +++ b/vendor/parsedown-0.9.0/.gitignore @@ -0,0 +1,3 @@ +.DS_Store +.idea +nbproject
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/.travis.yml b/vendor/parsedown-0.9.0/.travis.yml new file mode 100644 index 00000000..8e89bdcf --- /dev/null +++ b/vendor/parsedown-0.9.0/.travis.yml @@ -0,0 +1,8 @@ +language: php + +php: + - 5.5 + - 5.4 + - 5.3 + - 5.2 + - hhvm
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/LICENSE.txt b/vendor/parsedown-0.9.0/LICENSE.txt new file mode 100644 index 00000000..baca86f5 --- /dev/null +++ b/vendor/parsedown-0.9.0/LICENSE.txt @@ -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.
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/Parsedown.php b/vendor/parsedown-0.9.0/Parsedown.php new file mode 100755 index 00000000..1c93fb3a --- /dev/null +++ b/vendor/parsedown-0.9.0/Parsedown.php @@ -0,0 +1,1055 @@ +<?php + +# +# +# Parsedown +# http://parsedown.org +# +# (c) Emanuil Rusev +# http://erusev.com +# +# For the full license information, please view the LICENSE file that was +# distributed with this source code. +# +# + +class Parsedown +{ + # + # Multiton (http://en.wikipedia.org/wiki/Multiton_pattern) + # + + static function instance($name = 'default') + { + if (isset(self::$instances[$name])) + return self::$instances[$name]; + + $instance = new Parsedown(); + + self::$instances[$name] = $instance; + + return $instance; + } + + private static $instances = array(); + + # + # Setters + # + + private $breaks_enabled = false; + + function set_breaks_enabled($breaks_enabled) + { + $this->breaks_enabled = $breaks_enabled; + + return $this; + } + + # + # Fields + # + + private $reference_map = array(); + + # + # Public Methods + # + + function parse($text) + { + # removes \r characters + $text = str_replace("\r\n", "\n", $text); + $text = str_replace("\r", "\n", $text); + + # replaces tabs with spaces + $text = str_replace("\t", ' ', $text); + + # ~ + + $text = trim($text, "\n"); + + $lines = explode("\n", $text); + + $text = $this->parse_block_elements($lines); + + $text = rtrim($text, "\n"); + + return $text; + } + + # + # Private Methods + # + + private function parse_block_elements(array $lines, $context = '') + { + $elements = array(); + + $element = array( + 'type' => '', + ); + + foreach ($lines as $line) + { + # fenced elements + + switch ($element['type']) + { + case 'fenced block': + + if ( ! isset($element['closed'])) + { + if (preg_match('/^[ ]*'.$element['fence'][0].'{3,}[ ]*$/', $line)) + { + $element['closed'] = true; + } + else + { + $element['text'] !== '' and $element['text'] .= "\n"; + + $element['text'] .= $line; + } + + continue 2; + } + + break; + + case 'block-level markup': + + if ( ! isset($element['closed'])) + { + if (strpos($line, $element['start']) !== false) # opening tag + { + $element['depth']++; + } + + if (strpos($line, $element['end']) !== false) # closing tag + { + $element['depth'] > 0 + ? $element['depth']-- + : $element['closed'] = true; + } + + $element['text'] .= "\n".$line; + + continue 2; + } + + break; + } + + # * + + $deindented_line = ltrim($line); + + if ($deindented_line === '') + { + $element['interrupted'] = true; + + continue; + } + + # composite elements + + switch ($element['type']) + { + case 'blockquote': + + if ( ! isset($element['interrupted'])) + { + $line = preg_replace('/^[ ]*>[ ]?/', '', $line); + + $element['lines'] []= $line; + + continue 2; + } + + break; + + case 'li': + + if (preg_match('/^([ ]{0,3})(\d+[.]|[*+-])[ ](.*)/', $line, $matches)) + { + if ($element['indentation'] !== $matches[1]) + { + $element['lines'] []= $line; + } + else + { + unset($element['last']); + + $elements []= $element; + + unset($element['first']); + + $element['last'] = true; + $element['lines'] = array( + preg_replace('/^[ ]{0,4}/', '', $matches[3]), + ); + } + + continue 2; + } + + if (isset($element['interrupted'])) + { + if ($line[0] === ' ') + { + $element['lines'] []= ''; + + $line = preg_replace('/^[ ]{0,4}/', '', $line); + + $element['lines'] []= $line; + + unset($element['interrupted']); + + continue 2; + } + } + else + { + $line = preg_replace('/^[ ]{0,4}/', '', $line); + + $element['lines'] []= $line; + + continue 2; + } + + break; + } + + # indentation sensitive types + + switch ($line[0]) + { + case ' ': + + # code block + + if (isset($line[3]) and $line[3] === ' ' and $line[2] === ' ' and $line[1] === ' ') + { + $code_line = substr($line, 4); + + if ($element['type'] === 'code block') + { + if (isset($element['interrupted'])) + { + $element['text'] .= "\n"; + + unset ($element['interrupted']); + } + + $element['text'] .= "\n".$code_line; + } + else + { + $elements []= $element; + + $element = array( + 'type' => 'code block', + 'text' => $code_line, + ); + } + + continue 2; + } + + break; + + case '#': + + # atx heading (#) + + if (isset($line[1])) + { + $elements []= $element; + + $level = 1; + + while (isset($line[$level]) and $line[$level] === '#') + { + $level++; + } + + $element = array( + 'type' => 'heading', + 'text' => trim($line, '# '), + 'level' => $level, + ); + + continue 2; + } + + break; + + case '-': + case '=': + + # setext heading + + if ($element['type'] === 'paragraph' and isset($element['interrupted']) === false) + { + $chopped_line = rtrim($line); + + $i = 1; + + while (isset($chopped_line[$i])) + { + if ($chopped_line[$i] !== $line[0]) + { + break 2; + } + + $i++; + } + + $element['type'] = 'heading'; + $element['level'] = $line[0] === '-' ? 2 : 1; + + continue 2; + } + + break; + } + + # indentation insensitive types + + switch ($deindented_line[0]) + { + case '<': + + $position = strpos($deindented_line, '>'); + + if ($position > 1) # tag + { + $name = substr($deindented_line, 1, $position - 1); + $name = rtrim($name); + + if (substr($name, -1) === '/') + { + $self_closing = true; + + $name = substr($name, 0, -1); + } + + $position = strpos($name, ' '); + + if ($position) + { + $name = substr($name, 0, $position); + } + + if ( ! ctype_alpha($name)) + { + break; + } + + if (in_array($name, $this->inline_tags)) + { + break; + } + + $elements []= $element; + + if (isset($self_closing)) + { + $element = array( + 'type' => 'self-closing tag', + 'text' => $deindented_line, + ); + + unset($self_closing); + + continue 2; + } + + $element = array( + 'type' => 'block-level markup', + 'text' => $deindented_line, + 'start' => '<'.$name.'>', + 'end' => '</'.$name.'>', + 'depth' => 0, + ); + + if (strpos($deindented_line, $element['end'])) + { + $element['closed'] = true; + } + + continue 2; + } + + break; + + case '>': + + # quote + + if (preg_match('/^>[ ]?(.*)/', $deindented_line, $matches)) + { + $elements []= $element; + + $element = array( + 'type' => 'blockquote', + 'lines' => array( + $matches[1], + ), + ); + + continue 2; + } + + break; + + case '[': + + # reference + + if (preg_match('/^\[(.+?)\]:[ ]*(.+?)(?:[ ]+[\'"](.+?)[\'"])?[ ]*$/', $deindented_line, $matches)) + { + $label = strtolower($matches[1]); + + $this->reference_map[$label] = array( + '»' => trim($matches[2], '<>'), + ); + + if (isset($matches[3])) + { + $this->reference_map[$label]['#'] = $matches[3]; + } + + continue 2; + } + + break; + + case '`': + case '~': + + # fenced code block + + if (preg_match('/^([`]{3,}|[~]{3,})[ ]*(\S+)?[ ]*$/', $deindented_line, $matches)) + { + $elements []= $element; + + $element = array( + 'type' => 'fenced block', + 'text' => '', + 'fence' => $matches[1], + ); + + isset($matches[2]) and $element['language'] = $matches[2]; + + continue 2; + } + + break; + + case '*': + case '+': + case '-': + case '_': + + # hr + + if (preg_match('/^([-*_])([ ]{0,2}\1){2,}[ ]*$/', $deindented_line)) + { + $elements []= $element; + + $element = array( + 'type' => 'hr', + ); + + continue 2; + } + + # li + + if (preg_match('/^([ ]*)[*+-][ ](.*)/', $line, $matches)) + { + $elements []= $element; + + $element = array( + 'type' => 'li', + 'ordered' => false, + 'indentation' => $matches[1], + 'first' => true, + 'last' => true, + 'lines' => array( + preg_replace('/^[ ]{0,4}/', '', $matches[2]), + ), + ); + + continue 2; + } + } + + # li + + if ($deindented_line[0] <= '9' and $deindented_line[0] >= '0' and preg_match('/^([ ]*)\d+[.][ ](.*)/', $line, $matches)) + { + $elements []= $element; + + $element = array( + 'type' => 'li', + 'ordered' => true, + 'indentation' => $matches[1], + 'first' => true, + 'last' => true, + 'lines' => array( + preg_replace('/^[ ]{0,4}/', '', $matches[2]), + ), + ); + + continue; + } + + # paragraph + + if ($element['type'] === 'paragraph') + { + if (isset($element['interrupted'])) + { + $elements []= $element; + + $element['text'] = $line; + + unset($element['interrupted']); + } + else + { + $this->breaks_enabled and $element['text'] .= ' '; + + $element['text'] .= "\n".$line; + } + } + else + { + $elements []= $element; + + $element = array( + 'type' => 'paragraph', + 'text' => $line, + ); + } + } + + $elements []= $element; + + unset($elements[0]); + + # + # ~ + # + + $markup = ''; + + foreach ($elements as $element) + { + switch ($element['type']) + { + case 'paragraph': + + $text = $this->parse_span_elements($element['text']); + + if ($context === 'li' and $markup === '') + { + if (isset($element['interrupted'])) + { + $markup .= "\n".'<p>'.$text.'</p>'."\n"; + } + else + { + $markup .= $text; + + if (isset($elements[2])) + { + $markup .= "\n"; + } + } + } + else + { + $markup .= '<p>'.$text.'</p>'."\n"; + } + + break; + + case 'blockquote': + + $text = $this->parse_block_elements($element['lines']); + + $markup .= '<blockquote>'."\n".$text.'</blockquote>'."\n"; + + break; + + case 'code block': + + $text = htmlspecialchars($element['text'], ENT_NOQUOTES, 'UTF-8'); + + $markup .= '<pre><code>'.$text.'</code></pre>'."\n"; + + break; + + case 'fenced block': + + $text = htmlspecialchars($element['text'], ENT_NOQUOTES, 'UTF-8'); + + $markup .= '<pre><code'; + + isset($element['language']) and $markup .= ' class="language-'.$element['language'].'"'; + + $markup .= '>'.$text.'</code></pre>'."\n"; + + break; + + case 'heading': + + $text = $this->parse_span_elements($element['text']); + + $markup .= '<h'.$element['level'].'>'.$text.'</h'.$element['level'].'>'."\n"; + + break; + + case 'hr': + + $markup .= '<hr />'."\n"; + + break; + + case 'li': + + if (isset($element['first'])) + { + $type = $element['ordered'] ? 'ol' : 'ul'; + + $markup .= '<'.$type.'>'."\n"; + } + + if (isset($element['interrupted']) and ! isset($element['last'])) + { + $element['lines'] []= ''; + } + + $text = $this->parse_block_elements($element['lines'], 'li'); + + $markup .= '<li>'.$text.'</li>'."\n"; + + if (isset($element['last'])) + { + $type = $element['ordered'] ? 'ol' : 'ul'; + + $markup .= '</'.$type.'>'."\n"; + } + + break; + + case 'block-level markup': + + $markup .= $element['text']."\n"; + + break; + + default: + + $markup .= $element['text']."\n"; + } + } + + return $markup; + } + + private function parse_span_elements($text, $markers = array(" \n", '![', '&', '*', '<', '[', '\\', '_', '`', 'http', '~~')) + { + if (isset($text[1]) === false or $markers === array()) + { + return $text; + } + + # ~ + + $markup = ''; + + while ($markers) + { + $closest_marker = null; + $closest_marker_index = 0; + $closest_marker_position = null; + + foreach ($markers as $index => $marker) + { + $marker_position = strpos($text, $marker); + + if ($marker_position === false) + { + unset($markers[$index]); + + continue; + } + + if ($closest_marker === null or $marker_position < $closest_marker_position) + { + $closest_marker = $marker; + $closest_marker_index = $index; + $closest_marker_position = $marker_position; + } + } + + # ~ + + if ($closest_marker === null or isset($text[$closest_marker_position + 1]) === false) + { + $markup .= $text; + + break; + } + else + { + $markup .= substr($text, 0, $closest_marker_position); + } + + $text = substr($text, $closest_marker_position); + + # ~ + + unset($markers[$closest_marker_index]); + + # ~ + + switch ($closest_marker) + { + case " \n": + + $markup .= '<br />'."\n"; + + $offset = 3; + + break; + + case '![': + case '[': + + if (strpos($text, ']') and preg_match('/\[((?:[^][]|(?R))*)\]/', $text, $matches)) + { + $element = array( + '!' => $text[0] === '!', + 'a' => $matches[1], + ); + + $offset = strlen($matches[0]); + + $element['!'] and $offset++; + + $remaining_text = substr($text, $offset); + + if ($remaining_text[0] === '(' and preg_match('/\([ ]*(.*?)(?:[ ]+[\'"](.+?)[\'"])?[ ]*\)/', $remaining_text, $matches)) + { + $element['»'] = $matches[1]; + + if (isset($matches[2])) + { + $element['#'] = $matches[2]; + } + + $offset += strlen($matches[0]); + } + elseif ($this->reference_map) + { + $reference = $element['a']; + + if (preg_match('/^\s*\[(.*?)\]/', $remaining_text, $matches)) + { + $reference = $matches[1] ? $matches[1] : $element['a']; + + $offset += strlen($matches[0]); + } + + $reference = strtolower($reference); + + if (isset($this->reference_map[$reference])) + { + $element['»'] = $this->reference_map[$reference]['»']; + + if (isset($this->reference_map[$reference]['#'])) + { + $element['#'] = $this->reference_map[$reference]['#']; + } + } + else + { + unset($element); + } + } + else + { + unset($element); + } + } + + if (isset($element)) + { + $element['»'] = str_replace('&', '&', $element['»']); + $element['»'] = str_replace('<', '<', $element['»']); + + if ($element['!']) + { + $markup .= '<img alt="'.$element['a'].'" src="'.$element['»'].'"'; + + isset($element['#']) and $markup .= ' title="'.$element['#'].'"'; + + $markup .= ' />'; + } + else + { + $element['a'] = $this->parse_span_elements($element['a'], $markers); + + $markup .= '<a href="'.$element['»'].'"'; + + isset($element['#']) and $markup .= ' title="'.$element['#'].'"'; + + $markup .= '>'.$element['a'].'</a>'; + } + + unset($element); + } + else + { + $markup .= $closest_marker; + + $offset = $closest_marker === '![' ? 2 : 1; + } + + break; + + case '&': + + if (preg_match('/^&#?\w+;/', $text, $matches)) + { + $markup .= $matches[0]; + + $offset = strlen($matches[0]); + } + else + { + $markup .= '&'; + + $offset = 1; + } + + break; + + case '*': + case '_': + + if ($text[1] === $closest_marker and preg_match($this->strong_regex[$closest_marker], $text, $matches)) + { + $matches[1] = $this->parse_span_elements($matches[1], $markers); + + $markup .= '<strong>'.$matches[1].'</strong>'; + } + elseif (preg_match($this->em_regex[$closest_marker], $text, $matches)) + { + $matches[1] = $this->parse_span_elements($matches[1], $markers); + + $markup .= '<em>'.$matches[1].'</em>'; + } + elseif ($text[1] === $closest_marker and preg_match($this->strong_em_regex[$closest_marker], $text, $matches)) + { + $matches[2] = $this->parse_span_elements($matches[2], $markers); + + $matches[1] and $matches[1] = $this->parse_span_elements($matches[1], $markers); + $matches[3] and $matches[3] = $this->parse_span_elements($matches[3], $markers); + + $markup .= '<strong>'.$matches[1].'<em>'.$matches[2].'</em>'.$matches[3].'</strong>'; + } + elseif (preg_match($this->em_strong_regex[$closest_marker], $text, $matches)) + { + $matches[2] = $this->parse_span_elements($matches[2], $markers); + + $matches[1] and $matches[1] = $this->parse_span_elements($matches[1], $markers); + $matches[3] and $matches[3] = $this->parse_span_elements($matches[3], $markers); + + $markup .= '<em>'.$matches[1].'<strong>'.$matches[2].'</strong>'.$matches[3].'</em>'; + } + + if (isset($matches) and $matches) + { + $offset = strlen($matches[0]); + } + else + { + $markup .= $closest_marker; + + $offset = 1; + } + + break; + + case '<': + + if (strpos($text, '>') !== false) + { + if ($text[1] === 'h' and preg_match('/^<(https?:[\/]{2}[^\s]+?)>/i', $text, $matches)) + { + $element_url = $matches[1]; + $element_url = str_replace('&', '&', $element_url); + $element_url = str_replace('<', '<', $element_url); + + $markup .= '<a href="'.$element_url.'">'.$element_url.'</a>'; + + $offset = strlen($matches[0]); + } + elseif (strpos($text, '@') > 1 and preg_match('/<(\S+?@\S+?)>/', $text, $matches)) + { + $markup .= '<a href="mailto:'.$matches[1].'">'.$matches[1].'</a>'; + + $offset = strlen($matches[0]); + } + elseif (preg_match('/^<\/?\w.*?>/', $text, $matches)) + { + $markup .= $matches[0]; + + $offset = strlen($matches[0]); + } + else + { + $markup .= '<'; + + $offset = 1; + } + } + else + { + $markup .= '<'; + + $offset = 1; + } + + break; + + case '\\': + + if (in_array($text[1], $this->special_characters)) + { + $markup .= $text[1]; + + $offset = 2; + } + else + { + $markup .= '\\'; + + $offset = 1; + } + + break; + + case '`': + + if (preg_match('/^(`+)(.+?)\1(?!`)/', $text, $matches)) + { + $element_text = $matches[2]; + $element_text = htmlspecialchars($element_text, ENT_NOQUOTES, 'UTF-8'); + + $markup .= '<code>'.$element_text.'</code>'; + + $offset = strlen($matches[0]); + } + else + { + $markup .= '`'; + + $offset = 1; + } + + break; + + case 'http': + + if (preg_match('/^https?:[\/]{2}[^\s]+\b/i', $text, $matches)) + { + $element_url = $matches[0]; + $element_url = str_replace('&', '&', $element_url); + $element_url = str_replace('<', '<', $element_url); + + $markup .= '<a href="'.$element_url.'">'.$element_url.'</a>'; + + $offset = strlen($matches[0]); + } + else + { + $markup .= 'http'; + + $offset = 4; + } + + break; + + case '~~': + + if (preg_match('/^~~(?=\S)(.+?)(?<=\S)~~/', $text, $matches)) + { + $matches[1] = $this->parse_span_elements($matches[1], $markers); + + $markup .= '<del>'.$matches[1].'</del>'; + + $offset = strlen($matches[0]); + } + else + { + $markup .= '~~'; + + $offset = 2; + } + + break; + } + + if (isset($offset)) + { + $text = substr($text, $offset); + } + + $markers[$closest_marker_index] = $closest_marker; + } + + return $markup; + } + + # + # Read-only + # + + private $inline_tags = array( + 'a', 'abbr', 'acronym', 'b', 'bdo', 'big', 'br', 'button', + 'cite', 'code', 'dfn', 'em', 'i', 'img', 'input', 'kbd', + 'label', 'map', 'object', 'q', 'samp', 'script', 'select', 'small', + 'span', 'strong', 'sub', 'sup', 'textarea', 'tt', 'var', + ); + + private $special_characters = array('\\', '`', '*', '_', '{', '}', '[', ']', '(', ')', '>', '#', '+', '-', '.', '!'); + + # ~ + + private $strong_regex = array( + '*' => '/^[*]{2}([^*]+?)[*]{2}(?![*])/s', + '_' => '/^__([^_]+?)__(?!_)/s', + ); + + private $em_regex = array( + '*' => '/^[*]([^*]+?)[*](?![*])/s', + '_' => '/^_([^_]+?)[_](?![_])\b/s', + ); + + private $strong_em_regex = array( + '*' => '/^[*]{2}(.*?)[*](.+?)[*](.*?)[*]{2}/s', + '_' => '/^__(.*?)_(.+?)_(.*?)__/s', + ); + + private $em_strong_regex = array( + '*' => '/^[*](.*?)[*]{2}(.+?)[*]{2}(.*?)[*]/s', + '_' => '/^_(.*?)__(.+?)__(.*?)_/s', + ); +}
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/README.md b/vendor/parsedown-0.9.0/README.md new file mode 100644 index 00000000..c87f7e11 --- /dev/null +++ b/vendor/parsedown-0.9.0/README.md @@ -0,0 +1,31 @@ +## Parsedown + +Better [Markdown](http://en.wikipedia.org/wiki/Markdown) parser for PHP. + +*** + +[ [demo](http://parsedown.org/demo) ] [ [tests](http://parsedown.org/tests/) ] + +*** + +### Features + +* [fast](http://parsedown.org/speed) +* [consistent](http://parsedown.org/consistency) +* [GitHub Flavored](https://help.github.com/articles/github-flavored-markdown) +* [tested](https://travis-ci.org/erusev/parsedown) in PHP 5.2, 5.3, 5.4, 5.5 and [hhvm](http://www.hhvm.com/) +* friendly to international input + +### Installation + +Include `Parsedown.php` or install [the composer package](https://packagist.org/packages/erusev/parsedown). + +### Example + +```php +$text = 'Hello *Parsedown*!'; + +$result = Parsedown::instance()->parse($text); + +echo $result; # prints: <p>Hello <em>Parsedown</em>!</p> +``` diff --git a/vendor/parsedown-0.9.0/composer.json b/vendor/parsedown-0.9.0/composer.json new file mode 100644 index 00000000..1439b824 --- /dev/null +++ b/vendor/parsedown-0.9.0/composer.json @@ -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": ""} + } +}
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/phpunit.xml.dist b/vendor/parsedown-0.9.0/phpunit.xml.dist new file mode 100644 index 00000000..4c55dc26 --- /dev/null +++ b/vendor/parsedown-0.9.0/phpunit.xml.dist @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<phpunit colors="true"> + <testsuites> + <testsuite> + <file>tests/Test.php</file> + </testsuite> + </testsuites> +</phpunit>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/Test.php b/vendor/parsedown-0.9.0/tests/Test.php new file mode 100644 index 00000000..e38974ce --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/Test.php @@ -0,0 +1,55 @@ +<?php + +include 'Parsedown.php'; + +class Test extends PHPUnit_Framework_TestCase +{ + const provider_dir = 'data/'; + + /** + * @dataProvider provider + */ + function test_($markdown, $expected_markup) + { + $actual_markup = Parsedown::instance()->parse($markdown); + + $this->assertEquals($expected_markup, $actual_markup); + } + + function provider() + { + $provider = array(); + + $path = dirname(__FILE__).'/'; + + $DirectoryIterator = new DirectoryIterator($path . '/' . self::provider_dir); + + foreach ($DirectoryIterator as $Item) + { + if ($Item->isFile()) + { + $filename = $Item->getFilename(); + + $extension = pathinfo($filename, PATHINFO_EXTENSION); + + if ($extension !== 'md') + continue; + + $basename = $Item->getBasename('.md'); + + $markdown = file_get_contents($path . '/' . self::provider_dir . $basename . '.md'); + + if (!$markdown) + continue; + + $expected_markup = file_get_contents($path . '/' . self::provider_dir . $basename . '.html'); + $expected_markup = str_replace("\r\n", "\n", $expected_markup); + $expected_markup = str_replace("\r", "\n", $expected_markup); + + $provider [] = array($markdown, $expected_markup); + } + } + + return $provider; + } +}
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/atx_heading.html b/vendor/parsedown-0.9.0/tests/data/atx_heading.html new file mode 100644 index 00000000..6c9b38e9 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/atx_heading.html @@ -0,0 +1,8 @@ +<h1>h1</h1>
+<h2>h2</h2>
+<h3>h3</h3>
+<h4>h4</h4>
+<h5>h5</h5>
+<h6>h6</h6>
+<h1>closed h1</h1>
+<p>#</p>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/atx_heading.md b/vendor/parsedown-0.9.0/tests/data/atx_heading.md new file mode 100644 index 00000000..2d5c6ca0 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/atx_heading.md @@ -0,0 +1,15 @@ +# h1
+
+## h2
+
+### h3
+
+#### h4
+
+##### h5
+
+###### h6
+
+# closed h1 #
+
+#
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/automatic_link.html b/vendor/parsedown-0.9.0/tests/data/automatic_link.html new file mode 100644 index 00000000..50a94ba0 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/automatic_link.html @@ -0,0 +1 @@ +<p><a href="http://example.com">http://example.com</a></p>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/automatic_link.md b/vendor/parsedown-0.9.0/tests/data/automatic_link.md new file mode 100644 index 00000000..08d3bf46 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/automatic_link.md @@ -0,0 +1 @@ +<http://example.com>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/block-level_html.html b/vendor/parsedown-0.9.0/tests/data/block-level_html.html new file mode 100644 index 00000000..c4ccf54f --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/block-level_html.html @@ -0,0 +1,5 @@ +<div>_content_</div> +<p>sparse:</p> +<div> +_content_ +</div>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/block-level_html.md b/vendor/parsedown-0.9.0/tests/data/block-level_html.md new file mode 100644 index 00000000..40ba8938 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/block-level_html.md @@ -0,0 +1,7 @@ +<div>_content_</div> + +sparse: + +<div> +_content_ +</div>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/code_block.html b/vendor/parsedown-0.9.0/tests/data/code_block.html new file mode 100644 index 00000000..20f8de46 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/code_block.html @@ -0,0 +1,8 @@ +<pre><code><?php
+
+$message = 'Hello World!';
+echo $message;</code></pre>
+<hr />
+<pre><code>> not a quote
+- not a list item
+[not a reference]: http://foo.com</code></pre>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/code_block.md b/vendor/parsedown-0.9.0/tests/data/code_block.md new file mode 100644 index 00000000..59104cb6 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/code_block.md @@ -0,0 +1,11 @@ + <?php
+
+ $message = 'Hello World!';
+ echo $message;
+
+---
+
+ > not a quote
+ - not a list item
+ [not a reference]: http://foo.com
+
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/code_span.html b/vendor/parsedown-0.9.0/tests/data/code_span.html new file mode 100644 index 00000000..40674bec --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/code_span.html @@ -0,0 +1 @@ +<p>a <code>code span</code></p>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/code_span.md b/vendor/parsedown-0.9.0/tests/data/code_span.md new file mode 100644 index 00000000..dfd136b4 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/code_span.md @@ -0,0 +1 @@ +a `code span`
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/compound_blockquote.html b/vendor/parsedown-0.9.0/tests/data/compound_blockquote.html new file mode 100644 index 00000000..37afb57a --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/compound_blockquote.html @@ -0,0 +1,9 @@ +<blockquote> +<h2>header</h2> +<p>paragraph</p> +<ul> +<li>li</li> +</ul> +<hr /> +<p>paragraph</p> +</blockquote>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/compound_blockquote.md b/vendor/parsedown-0.9.0/tests/data/compound_blockquote.md new file mode 100644 index 00000000..80c4aed1 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/compound_blockquote.md @@ -0,0 +1,10 @@ +> header +> ------ +> +> paragraph +> +> - li +> +> --- +> +> paragraph
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/compound_emphasis.html b/vendor/parsedown-0.9.0/tests/data/compound_emphasis.html new file mode 100644 index 00000000..178dd54b --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/compound_emphasis.html @@ -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>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/compound_emphasis.md b/vendor/parsedown-0.9.0/tests/data/compound_emphasis.md new file mode 100644 index 00000000..6fe07f26 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/compound_emphasis.md @@ -0,0 +1,4 @@ +_`code`_ __`code`__ + +*`code`**`code`**`code`* + diff --git a/vendor/parsedown-0.9.0/tests/data/compound_list.html b/vendor/parsedown-0.9.0/tests/data/compound_list.html new file mode 100644 index 00000000..f5593c14 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/compound_list.html @@ -0,0 +1,12 @@ +<ul> +<li> +<p>paragraph</p> +<p>paragraph</p> +</li> +<li> +<p>paragraph</p> +<blockquote> +<p>quote</p> +</blockquote> +</li> +</ul>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/compound_list.md b/vendor/parsedown-0.9.0/tests/data/compound_list.md new file mode 100644 index 00000000..ed7f0c60 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/compound_list.md @@ -0,0 +1,7 @@ +- paragraph + + paragraph + +- paragraph + + > quote
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/em_strong.html b/vendor/parsedown-0.9.0/tests/data/em_strong.html new file mode 100644 index 00000000..323d60ae --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/em_strong.html @@ -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>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/em_strong.md b/vendor/parsedown-0.9.0/tests/data/em_strong.md new file mode 100644 index 00000000..9abeb3fd --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/em_strong.md @@ -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**
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/email.html b/vendor/parsedown-0.9.0/tests/data/email.html new file mode 100644 index 00000000..c40759c9 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/email.html @@ -0,0 +1 @@ +<p>my email is <a href="mailto:me@example.com">me@example.com</a></p>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/email.md b/vendor/parsedown-0.9.0/tests/data/email.md new file mode 100644 index 00000000..26b7b6cc --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/email.md @@ -0,0 +1 @@ +my email is <me@example.com>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/emphasis.html b/vendor/parsedown-0.9.0/tests/data/emphasis.html new file mode 100644 index 00000000..9d3f871a --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/emphasis.html @@ -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>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/emphasis.md b/vendor/parsedown-0.9.0/tests/data/emphasis.md new file mode 100644 index 00000000..a8f0c989 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/emphasis.md @@ -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
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/escaping.html b/vendor/parsedown-0.9.0/tests/data/escaping.html new file mode 100644 index 00000000..64676cb1 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/escaping.html @@ -0,0 +1,4 @@ +<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>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/escaping.md b/vendor/parsedown-0.9.0/tests/data/escaping.md new file mode 100644 index 00000000..164039f8 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/escaping.md @@ -0,0 +1,7 @@ +escaped \*emphasis\*. + +`escaped \*emphasis\* in a code span` + + escaped \*emphasis\* in a code block + +\\ \` \* \_ \{ \} \[ \] \( \) \> \# \+ \- \. \!
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/fenced_code_block.html b/vendor/parsedown-0.9.0/tests/data/fenced_code_block.html new file mode 100644 index 00000000..8bdabba9 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/fenced_code_block.html @@ -0,0 +1,6 @@ +<pre><code><?php + +$message = 'fenced code block'; +echo $message;</code></pre> +<pre><code>tilde</code></pre> +<pre><code class="language-php">echo 'language identifier';</code></pre>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/fenced_code_block.md b/vendor/parsedown-0.9.0/tests/data/fenced_code_block.md new file mode 100644 index 00000000..cbed8ebb --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/fenced_code_block.md @@ -0,0 +1,14 @@ +``` +<?php + +$message = 'fenced code block'; +echo $message; +``` + +~~~ +tilde +~~~ + +```php +echo 'language identifier'; +```
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/horizontal_rule.html b/vendor/parsedown-0.9.0/tests/data/horizontal_rule.html new file mode 100644 index 00000000..248b7911 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/horizontal_rule.html @@ -0,0 +1,5 @@ +<hr />
+<hr />
+<hr />
+<hr />
+<hr />
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/horizontal_rule.md b/vendor/parsedown-0.9.0/tests/data/horizontal_rule.md new file mode 100644 index 00000000..12efdd3b --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/horizontal_rule.md @@ -0,0 +1,9 @@ +---
+
+- - -
+
+ - - -
+
+***
+
+___
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/html_entity.html b/vendor/parsedown-0.9.0/tests/data/html_entity.html new file mode 100644 index 00000000..4d23e3cd --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/html_entity.html @@ -0,0 +1 @@ +<p>& © {</p>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/html_entity.md b/vendor/parsedown-0.9.0/tests/data/html_entity.md new file mode 100644 index 00000000..ff545ea5 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/html_entity.md @@ -0,0 +1 @@ +& © {
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/image_reference.html b/vendor/parsedown-0.9.0/tests/data/image_reference.html new file mode 100644 index 00000000..b3249cba --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/image_reference.html @@ -0,0 +1 @@ +<p><img alt="Markdown Logo" src="/md.png" /></p>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/image_reference.md b/vendor/parsedown-0.9.0/tests/data/image_reference.md new file mode 100644 index 00000000..dcb1414d --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/image_reference.md @@ -0,0 +1,3 @@ +![Markdown Logo][image] + +[image]: /md.png diff --git a/vendor/parsedown-0.9.0/tests/data/image_title.html b/vendor/parsedown-0.9.0/tests/data/image_title.html new file mode 100644 index 00000000..82c155f6 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/image_title.html @@ -0,0 +1 @@ +<p><img alt="alt" src="/md.png" title="title" /></p>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/image_title.md b/vendor/parsedown-0.9.0/tests/data/image_title.md new file mode 100644 index 00000000..3e58ee55 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/image_title.md @@ -0,0 +1 @@ +![alt](/md.png "title")
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/implicit_reference.html b/vendor/parsedown-0.9.0/tests/data/implicit_reference.html new file mode 100644 index 00000000..209b85e7 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/implicit_reference.html @@ -0,0 +1,3 @@ +<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" title="Example">explicit</a> reference link with a title</p>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/implicit_reference.md b/vendor/parsedown-0.9.0/tests/data/implicit_reference.md new file mode 100644 index 00000000..d1288263 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/implicit_reference.md @@ -0,0 +1,9 @@ +an [implicit] reference link + +[implicit]: http://example.com + +an [implicit][] reference link with an empty link definition + +an [explicit][example] reference link with a title + +[example]: http://example.com "Example"
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/inline_link.html b/vendor/parsedown-0.9.0/tests/data/inline_link.html new file mode 100644 index 00000000..2b9e649d --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/inline_link.html @@ -0,0 +1,4 @@ +<p><a href="http://example.com">link</a> and <a href="/tests/">another link</a></p> +<p><a href="http://example.com"><code>link</code></a></p> +<p><a href="http://example.com"><img alt="MD Logo" src="http://parsedown.org/md.png" /></a></p> +<p><a href="http://example.com"><img alt="MD Logo" src="http://parsedown.org/md.png" /> and text</a></p>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/inline_link.md b/vendor/parsedown-0.9.0/tests/data/inline_link.md new file mode 100644 index 00000000..cd8e5a63 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/inline_link.md @@ -0,0 +1,7 @@ +[link](http://example.com) and [another link](/tests/) + +[`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)
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/inline_title.html b/vendor/parsedown-0.9.0/tests/data/inline_title.html new file mode 100644 index 00000000..bbab93b6 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/inline_title.html @@ -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>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/inline_title.md b/vendor/parsedown-0.9.0/tests/data/inline_title.md new file mode 100644 index 00000000..cb09344a --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/inline_title.md @@ -0,0 +1 @@ +[single quotes](http://example.com 'Example') and [double quotes](http://example.com "Example")
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/lazy_blockquote.html b/vendor/parsedown-0.9.0/tests/data/lazy_blockquote.html new file mode 100644 index 00000000..c368a0b8 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/lazy_blockquote.html @@ -0,0 +1,4 @@ +<blockquote> +<p>quote +the rest of it</p> +</blockquote>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/lazy_blockquote.md b/vendor/parsedown-0.9.0/tests/data/lazy_blockquote.md new file mode 100644 index 00000000..8490c22e --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/lazy_blockquote.md @@ -0,0 +1,2 @@ +> quote +the rest of it
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/lazy_list.html b/vendor/parsedown-0.9.0/tests/data/lazy_list.html new file mode 100644 index 00000000..1a519924 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/lazy_list.html @@ -0,0 +1,4 @@ +<ul> +<li>li +the rest of it</li> +</ul>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/lazy_list.md b/vendor/parsedown-0.9.0/tests/data/lazy_list.md new file mode 100644 index 00000000..62ad9d71 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/lazy_list.md @@ -0,0 +1,2 @@ +- li +the rest of it
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/line_break.html b/vendor/parsedown-0.9.0/tests/data/line_break.html new file mode 100644 index 00000000..d65cae9d --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/line_break.html @@ -0,0 +1,2 @@ +<p>line<br />
+line</p>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/line_break.md b/vendor/parsedown-0.9.0/tests/data/line_break.md new file mode 100644 index 00000000..2908f6f4 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/line_break.md @@ -0,0 +1,2 @@ +line
+line
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/multiline_list_paragraph.html b/vendor/parsedown-0.9.0/tests/data/multiline_list_paragraph.html new file mode 100644 index 00000000..3247bd22 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/multiline_list_paragraph.html @@ -0,0 +1,7 @@ +<ul> +<li> +<p>li</p> +<p>line +line</p> +</li> +</ul>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/multiline_list_paragraph.md b/vendor/parsedown-0.9.0/tests/data/multiline_list_paragraph.md new file mode 100644 index 00000000..f5b42729 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/multiline_list_paragraph.md @@ -0,0 +1,4 @@ +- li + + line + line
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/nested_block-level_html.html b/vendor/parsedown-0.9.0/tests/data/nested_block-level_html.html new file mode 100644 index 00000000..bfbef54d --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/nested_block-level_html.html @@ -0,0 +1,10 @@ +<div> +_parent_ +<div> +_child_ +</div> +<pre> +_adopted child_ +</pre> +</div> +<p><em>outside</em></p>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/nested_block-level_html.md b/vendor/parsedown-0.9.0/tests/data/nested_block-level_html.md new file mode 100644 index 00000000..5e01e109 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/nested_block-level_html.md @@ -0,0 +1,11 @@ +<div> +_parent_ +<div> +_child_ +</div> +<pre> +_adopted child_ +</pre> +</div> + +_outside_
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/ordered_list.html b/vendor/parsedown-0.9.0/tests/data/ordered_list.html new file mode 100644 index 00000000..b6c5216c --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/ordered_list.html @@ -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>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/ordered_list.md b/vendor/parsedown-0.9.0/tests/data/ordered_list.md new file mode 100644 index 00000000..b307032c --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/ordered_list.md @@ -0,0 +1,11 @@ +1. one +2. two + +repeating numbers: + +1. one +1. two + +large numbers: + +123. one
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/paragraph_list.html b/vendor/parsedown-0.9.0/tests/data/paragraph_list.html new file mode 100644 index 00000000..ced1c43e --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/paragraph_list.html @@ -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>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/paragraph_list.md b/vendor/parsedown-0.9.0/tests/data/paragraph_list.md new file mode 100644 index 00000000..b973908c --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/paragraph_list.md @@ -0,0 +1,9 @@ +paragraph +- li +- li + +paragraph + + * li + + * li
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/reference_title.html b/vendor/parsedown-0.9.0/tests/data/reference_title.html new file mode 100644 index 00000000..70e589aa --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/reference_title.html @@ -0,0 +1 @@ +<p><a href="http://example.com" title="Title">single quotes</a> and <a href="http://example.com" title="Title">double quotes</a></p>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/reference_title.md b/vendor/parsedown-0.9.0/tests/data/reference_title.md new file mode 100644 index 00000000..162b832a --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/reference_title.md @@ -0,0 +1 @@ +[single quotes](http://example.com 'Title') and [double quotes](http://example.com "Title")
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/self-closing_block-level_html.html b/vendor/parsedown-0.9.0/tests/data/self-closing_block-level_html.html new file mode 100644 index 00000000..c3cb1f42 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/self-closing_block-level_html.html @@ -0,0 +1,4 @@ +<hr /> +<p>attributes:</p> +<hr style="background: #9bd;" /> +<p>...</p>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/self-closing_block-level_html.md b/vendor/parsedown-0.9.0/tests/data/self-closing_block-level_html.md new file mode 100644 index 00000000..95f00ec7 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/self-closing_block-level_html.md @@ -0,0 +1,7 @@ +<hr /> + +attributes: + +<hr style="background: #9bd;" /> + +...
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/setext_header.html b/vendor/parsedown-0.9.0/tests/data/setext_header.html new file mode 100644 index 00000000..41f2b044 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/setext_header.html @@ -0,0 +1,5 @@ +<h1>h1</h1>
+<h2>h2</h2>
+<h2>single character</h2>
+<p>not a header</p>
+<hr />
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/setext_header.md b/vendor/parsedown-0.9.0/tests/data/setext_header.md new file mode 100644 index 00000000..49e03e03 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/setext_header.md @@ -0,0 +1,12 @@ +h1
+==
+
+h2
+--
+
+single character
+-
+
+not a header
+
+------------
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/simple_blockquote.html b/vendor/parsedown-0.9.0/tests/data/simple_blockquote.html new file mode 100644 index 00000000..8225d57c --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/simple_blockquote.html @@ -0,0 +1,11 @@ +<blockquote> +<p>quote</p> +</blockquote> +<p>indented:</p> +<blockquote> +<p>quote</p> +</blockquote> +<p>no space after <code>></code>:</p> +<blockquote> +<p>quote</p> +</blockquote>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/simple_blockquote.md b/vendor/parsedown-0.9.0/tests/data/simple_blockquote.md new file mode 100644 index 00000000..22b6b11a --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/simple_blockquote.md @@ -0,0 +1,7 @@ +> quote + +indented: + > quote + +no space after `>`: +>quote
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/span-level_html.html b/vendor/parsedown-0.9.0/tests/data/span-level_html.html new file mode 100644 index 00000000..590b6343 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/span-level_html.html @@ -0,0 +1,4 @@ +<p>an <b>important</b> <a href=''>link</a></p> +<p>broken<br/> +line</p> +<p><b>inline tag</b> at the beginning</p>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/span-level_html.md b/vendor/parsedown-0.9.0/tests/data/span-level_html.md new file mode 100644 index 00000000..aadf6fc6 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/span-level_html.md @@ -0,0 +1,6 @@ +an <b>important</b> <a href=''>link</a> + +broken<br/> +line + +<b>inline tag</b> at the beginning
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/sparse_list.html b/vendor/parsedown-0.9.0/tests/data/sparse_list.html new file mode 100644 index 00000000..452b2b86 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/sparse_list.html @@ -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>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/sparse_list.md b/vendor/parsedown-0.9.0/tests/data/sparse_list.md new file mode 100644 index 00000000..362a35f5 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/sparse_list.md @@ -0,0 +1,9 @@ +- li + +- li + +--- + +- li + + - indented li
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/special_characters.html b/vendor/parsedown-0.9.0/tests/data/special_characters.html new file mode 100644 index 00000000..79fad4c2 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/special_characters.html @@ -0,0 +1,6 @@ +<p>AT&T has an ampersand in their name</p>
+<p>this & that</p>
+<p>4 < 5 and 6 > 5</p>
+<p><a href="http://example.com/autolink?a=1&b=2">http://example.com/autolink?a=1&b=2</a></p>
+<p><a href="/script?a=1&b=2">inline link</a></p>
+<p><a href="http://example.com/?a=1&b=2">reference link</a></p>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/special_characters.md b/vendor/parsedown-0.9.0/tests/data/special_characters.md new file mode 100644 index 00000000..13597e60 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/special_characters.md @@ -0,0 +1,13 @@ +AT&T has an ampersand in their name
+
+this & that
+
+4 < 5 and 6 > 5
+
+<http://example.com/autolink?a=1&b=2>
+
+[inline link](/script?a=1&b=2)
+
+[reference link][1]
+
+[1]: http://example.com/?a=1&b=2
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/strikethrough.html b/vendor/parsedown-0.9.0/tests/data/strikethrough.html new file mode 100644 index 00000000..2a9da982 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/strikethrough.html @@ -0,0 +1,3 @@ +<p><del>strikethrough</del></p> +<p>here's <del>one</del> followed by <del>another one</del></p> +<p>~~ this ~~ is not one neither is ~this~</p>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/strikethrough.md b/vendor/parsedown-0.9.0/tests/data/strikethrough.md new file mode 100644 index 00000000..d169144d --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/strikethrough.md @@ -0,0 +1,5 @@ +~~strikethrough~~ + +here's ~~one~~ followed by ~~another one~~ + +~~ this ~~ is not one neither is ~this~
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/strong_em.html b/vendor/parsedown-0.9.0/tests/data/strong_em.html new file mode 100644 index 00000000..b709c991 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/strong_em.html @@ -0,0 +1,6 @@ +<p><em>em <strong>strong em</strong></em></p> +<p><em><strong>strong em</strong> em</em></p> +<p><em>em <strong>strong em</strong> em</em></p> +<p><em>em <strong>strong em</strong></em></p> +<p><em><strong>strong em</strong> em</em></p> +<p><em>em <strong>strong em</strong> em</em></p>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/strong_em.md b/vendor/parsedown-0.9.0/tests/data/strong_em.md new file mode 100644 index 00000000..f2aa3c78 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/strong_em.md @@ -0,0 +1,11 @@ +*em **strong em*** + +***strong em** em* + +*em **strong em** em* + +_em __strong em___ + +___strong em__ em_ + +_em __strong em__ em_
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/tab-indented_code_block.html b/vendor/parsedown-0.9.0/tests/data/tab-indented_code_block.html new file mode 100644 index 00000000..0331c25d --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/tab-indented_code_block.html @@ -0,0 +1,6 @@ +<pre><code><?php + +$message = 'Hello World!'; +echo $message; + +echo "following a blank line";</code></pre>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/tab-indented_code_block.md b/vendor/parsedown-0.9.0/tests/data/tab-indented_code_block.md new file mode 100644 index 00000000..a2087ae1 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/tab-indented_code_block.md @@ -0,0 +1,6 @@ + <?php + + $message = 'Hello World!'; + echo $message; + + echo "following a blank line";
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/text_reference.html b/vendor/parsedown-0.9.0/tests/data/text_reference.html new file mode 100644 index 00000000..26587f5a --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/text_reference.html @@ -0,0 +1,7 @@ +<p><a href="http://example.com">reference link</a></p> +<p><a href="http://example.com">one</a> with a semantic name</p> +<p>[one][404] with no definition</p> +<p><a href="http://example.com">multiline +one</a> defined on 2 lines</p> +<p><a href="http://example.com">one</a> with an upper case label</p> +<p><a href="http://example.com"><code>link</code></a></p>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/text_reference.md b/vendor/parsedown-0.9.0/tests/data/text_reference.md new file mode 100644 index 00000000..7768e302 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/text_reference.md @@ -0,0 +1,18 @@ +[reference link][1] + +[1]: http://example.com + +[one][website] with a semantic name + +[website]: http://example.com + +[one][404] with no definition + +[multiline +one][website] defined on 2 lines + +[one][label] with an upper case label + +[LABEL]: http://example.com + +[`link`][website]
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/unordered_list.html b/vendor/parsedown-0.9.0/tests/data/unordered_list.html new file mode 100644 index 00000000..cd95567b --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/unordered_list.html @@ -0,0 +1,10 @@ +<ul> +<li>li</li> +<li>li</li> +</ul> +<p>mixed markers:</p> +<ul> +<li>li</li> +<li>li</li> +<li>li</li> +</ul>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/unordered_list.md b/vendor/parsedown-0.9.0/tests/data/unordered_list.md new file mode 100644 index 00000000..cf62c99f --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/unordered_list.md @@ -0,0 +1,8 @@ +- li +- li + +mixed markers: + +* li ++ li +- li
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/url_autolinking.html b/vendor/parsedown-0.9.0/tests/data/url_autolinking.html new file mode 100644 index 00000000..9862cc4a --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/url_autolinking.html @@ -0,0 +1,2 @@ +<p>an autolink <a href="http://example.com">http://example.com</a></p> +<p>inside of brackets [<a href="http://example.com">http://example.com</a>], inside of braces {<a href="http://example.com">http://example.com</a>}, inside of parentheses (<a href="http://example.com">http://example.com</a>)</p>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/url_autolinking.md b/vendor/parsedown-0.9.0/tests/data/url_autolinking.md new file mode 100644 index 00000000..8cc442a5 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/url_autolinking.md @@ -0,0 +1,3 @@ +an autolink http://example.com + +inside of brackets [http://example.com], inside of braces {http://example.com}, inside of parentheses (http://example.com)
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/whitespace.html b/vendor/parsedown-0.9.0/tests/data/whitespace.html new file mode 100644 index 00000000..f2dd7a00 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/whitespace.html @@ -0,0 +1 @@ +<pre><code>code</code></pre>
\ No newline at end of file diff --git a/vendor/parsedown-0.9.0/tests/data/whitespace.md b/vendor/parsedown-0.9.0/tests/data/whitespace.md new file mode 100644 index 00000000..4cf926a8 --- /dev/null +++ b/vendor/parsedown-0.9.0/tests/data/whitespace.md @@ -0,0 +1,5 @@ + + + code + +
\ No newline at end of file |