diff --git a/composer.json b/composer.json index 47e110e..1c38095 100644 --- a/composer.json +++ b/composer.json @@ -12,6 +12,7 @@ } ], "require": { - "php": ">=5.3" + "php": ">=5.3", + "erusev/parsedown": "dev-master" } } diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..e383ddd --- /dev/null +++ b/composer.lock @@ -0,0 +1,64 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" + ], + "hash": "316e27cc72bce34db33fdde3d1b1c414", + "packages": [ + { + "name": "erusev/parsedown", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/erusev/parsedown.git", + "reference": "60819541858f9da6fcb77e8bd09693635553d3ef" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/erusev/parsedown/zipball/60819541858f9da6fcb77e8bd09693635553d3ef", + "reference": "60819541858f9da6fcb77e8bd09693635553d3ef", + "shasum": "" + }, + "type": "library", + "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" + ], + "time": "2014-04-17 21:19:22" + } + ], + "packages-dev": [ + + ], + "aliases": [ + + ], + "minimum-stability": "stable", + "stability-flags": { + "erusev/parsedown": 20 + }, + "platform": { + "php": ">=5.3" + }, + "platform-dev": [ + + ] +} diff --git a/libs/functions.php b/libs/functions.php index 62139ee..d336de1 100644 --- a/libs/functions.php +++ b/libs/functions.php @@ -1,6 +1,6 @@ text($page['markdown']); $page['title'] = clean_url($file, 'Title'); } $relative_base = ($mode === 'Static') ? relative_path("", $file) : "http://" . $base_path . '/'; diff --git a/vendor/autoload.php b/vendor/autoload.php new file mode 100644 index 0000000..d987280 --- /dev/null +++ b/vendor/autoload.php @@ -0,0 +1,7 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0 class loader + * + * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + */ +class ClassLoader +{ + // PSR-4 + private $prefixLengthsPsr4 = array(); + private $prefixDirsPsr4 = array(); + private $fallbackDirsPsr4 = array(); + + // PSR-0 + private $prefixesPsr0 = array(); + private $fallbackDirsPsr0 = array(); + + private $useIncludePath = false; + private $classMap = array(); + + public function getPrefixes() + { + return call_user_func_array('array_merge', $this->prefixesPsr0); + } + + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param array $classMap Class to filename map + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + */ + public function add($prefix, $paths, $prepend = false) + { + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + (array) $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + (array) $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = (array) $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + (array) $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-0 base directories + * @param bool $prepend Whether to prepend the directories + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + (array) $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + (array) $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + (array) $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 base directories + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + */ + public function setPsr4($prefix, $paths) { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + } + + /** + * Unregisters this instance as an autoloader. + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return bool|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + includeFile($file); + + return true; + } + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731 + if ('\\' == $class[0]) { + $class = substr($class, 1); + } + + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if ($file === null && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if ($file === null) { + // Remember that this class does not exist. + return $this->classMap[$class] = false; + } + + return $file; + } + + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) { + if (0 === strpos($class, $prefix)) { + foreach ($this->prefixDirsPsr4[$prefix] as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + } +} + +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + */ +function includeFile($file) +{ + include $file; +} diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php new file mode 100644 index 0000000..7a91153 --- /dev/null +++ b/vendor/composer/autoload_classmap.php @@ -0,0 +1,9 @@ + array($vendorDir . '/erusev/parsedown'), +); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php new file mode 100644 index 0000000..b265c64 --- /dev/null +++ b/vendor/composer/autoload_psr4.php @@ -0,0 +1,9 @@ + $path) { + $loader->set($namespace, $path); + } + + $map = require __DIR__ . '/autoload_psr4.php'; + foreach ($map as $namespace => $path) { + $loader->setPsr4($namespace, $path); + } + + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } + + $loader->register(true); + + return $loader; + } +} + +function composerRequirec4f9f971364586e3674cb9fcd0600bab($file) +{ + require $file; +} diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json new file mode 100644 index 0000000..fd728d7 --- /dev/null +++ b/vendor/composer/installed.json @@ -0,0 +1,43 @@ +[ + { + "name": "erusev/parsedown", + "version": "dev-master", + "version_normalized": "9999999-dev", + "source": { + "type": "git", + "url": "https://github.com/erusev/parsedown.git", + "reference": "60819541858f9da6fcb77e8bd09693635553d3ef" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/erusev/parsedown/zipball/60819541858f9da6fcb77e8bd09693635553d3ef", + "reference": "60819541858f9da6fcb77e8bd09693635553d3ef", + "shasum": "" + }, + "time": "2014-04-17 21:19:22", + "type": "library", + "installation-source": "source", + "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/vendor/erusev/parsedown/.travis.yml b/vendor/erusev/parsedown/.travis.yml new file mode 100644 index 0000000..ebe4d30 --- /dev/null +++ b/vendor/erusev/parsedown/.travis.yml @@ -0,0 +1,9 @@ +language: php + +php: + - 5.6 + - 5.5 + - 5.4 + - 5.3 + - 5.2 + - hhvm diff --git a/vendor/erusev/parsedown/LICENSE.txt b/vendor/erusev/parsedown/LICENSE.txt new file mode 100644 index 0000000..baca86f --- /dev/null +++ b/vendor/erusev/parsedown/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/erusev/parsedown/Parsedown.php b/vendor/erusev/parsedown/Parsedown.php new file mode 100755 index 0000000..e7f4f9e --- /dev/null +++ b/vendor/erusev/parsedown/Parsedown.php @@ -0,0 +1,1309 @@ +lines($lines); + + # trim line breaks + $markup = trim($markup, "\n"); + + # clean up + $this->references = array(); + + return $markup; + } + + # + # Setters + # + + function setBreaksEnabled($breaksEnabled) + { + $this->breaksEnabled = $breaksEnabled; + + return $this; + } + + private $breaksEnabled; + + # + # Blocks + # + + protected $blockMarkers = array( + '#' => array('Atx'), + '*' => array('Rule', 'List'), + '+' => array('List'), + '-' => array('Setext', 'Table', 'Rule', 'List'), + '0' => array('List'), + '1' => array('List'), + '2' => array('List'), + '3' => array('List'), + '4' => array('List'), + '5' => array('List'), + '6' => array('List'), + '7' => array('List'), + '8' => array('List'), + '9' => array('List'), + ':' => array('Table'), + '<' => array('Markup'), + '=' => array('Setext'), + '>' => array('Quote'), + '[' => array('Reference'), + '_' => array('Rule'), + '`' => array('FencedCode'), + '|' => array('Table'), + '~' => array('FencedCode'), + ); + + # Draft + protected $definitionMarkers = array( + '[' => array('Reference'), + ); + + protected $unmarkedBlockTypes = array( + 'CodeBlock', + ); + + private function lines(array $lines) + { + $CurrentBlock = null; + + foreach ($lines as $line) + { + $indent = 0; + + while (true) + { + if (isset($line[$indent])) + { + if ($line[$indent] === ' ') + { + $indent ++; + } + else + { + break; + } + } + else # blank line + { + if (isset($CurrentBlock)) + { + $CurrentBlock['interrupted'] = true; + } + + continue 2; + } + } + + $text = $indent > 0 ? substr($line, $indent) : $line; + + # ~ + + $Line = array('body' => $line, 'indent' => $indent, 'text' => $text); + + # Multiline block types define "addTo" methods. + + if (isset($CurrentBlock['incomplete'])) + { + $Block = $this->{'addTo'.$CurrentBlock['type']}($Line, $CurrentBlock); + + if (isset($Block)) + { + $CurrentBlock = $Block; + + continue; + } + else + { + unset($CurrentBlock['incomplete']); + + if (method_exists($this, 'complete'.$CurrentBlock['type'])) + { + $CurrentBlock = $this->{'complete'.$CurrentBlock['type']}($CurrentBlock); + } + } + } + + # ~ + + $blockTypes = $this->unmarkedBlockTypes; + + $marker = $text[0]; + + if (isset($this->blockMarkers[$marker])) + { + foreach ($this->blockMarkers[$marker] as $blockType) + { + $blockTypes []= $blockType; + } + } + + # + # ~ + + foreach ($blockTypes as $blockType) + { + # Block types define "identify" methods. + + $Block = $this->{'identify'.$blockType}($Line, $CurrentBlock); + + if (isset($Block)) + { + $Block['type'] = $blockType; + + if ( ! isset($Block['identified'])) # » + { + $elements []= $CurrentBlock['element']; + + $Block['identified'] = true; + } + + # Multiline block types define "addTo" methods. + + if (method_exists($this, 'addTo'.$blockType)) + { + $Block['incomplete'] = true; + } + + $CurrentBlock = $Block; + + continue 2; + } + } + + # ~ + + if ($CurrentBlock['type'] === 'Paragraph' and ! isset($CurrentBlock['interrupted'])) + { + $CurrentBlock['element']['text'] .= "\n".$text; + } + else + { + $elements []= $CurrentBlock['element']; + + $CurrentBlock = array( + 'type' => 'Paragraph', + 'identified' => true, + 'element' => array( + 'name' => 'p', + 'text' => $text, + 'handler' => 'line', + ), + ); + } + } + + $elements []= $CurrentBlock['element']; + + unset($elements[0]); + + # ~ + + $markup = $this->elements($elements); + + # ~ + + return $markup; + } + + # + # Atx + + protected function identifyAtx($Line) + { + if (isset($Line['text'][1])) + { + $level = 1; + + while (isset($Line['text'][$level]) and $Line['text'][$level] === '#') + { + $level ++; + } + + $text = trim($Line['text'], '# '); + + $Block = array( + 'element' => array( + 'name' => 'h'.$level, + 'text' => $text, + 'handler' => 'line', + ), + ); + + return $Block; + } + } + + # + # Rule + + protected function identifyRule($Line) + { + if (preg_match('/^(['.$Line['text'][0].'])([ ]{0,2}\1){2,}[ ]*$/', $Line['text'])) + { + $Block = array( + 'element' => array( + 'name' => 'hr' + ), + ); + + return $Block; + } + } + + # + # Reference + + protected function identifyReference($Line) + { + if (preg_match('/^\[(.+?)\]:[ ]*?(?:[ ]+["\'(](.+)["\')])?[ ]*$/', $Line['text'], $matches)) + { + $label = strtolower($matches[1]); + + $this->references[$label] = array( + 'url' => $matches[2], + ); + + if (isset($matches[3])) + { + $this->references[$label]['title'] = $matches[3]; + } + + $Block = array( + 'element' => null, + ); + + return $Block; + } + } + + # + # Setext + + protected function identifySetext($Line, array $Block = null) + { + if ( ! isset($Block) or $Block['type'] !== 'Paragraph' or isset($Block['interrupted'])) + { + return; + } + + if (chop($Line['text'], $Line['text'][0]) === '') + { + $Block['element']['name'] = $Line['text'][0] === '=' ? 'h1' : 'h2'; + + return $Block; + } + } + + # + # Markup + + protected function identifyMarkup($Line) + { + if (preg_match('/^<(\w[\w\d]*)(?:[ ][^>\/]*)?(\/?)[ ]*>/', $Line['text'], $matches)) + { + if (in_array($matches[1], $this->textLevelElements)) + { + return; + } + + $Block = array( + 'element' => $Line['body'], + ); + + if ($matches[2] or $matches[1] === 'hr' or preg_match('/<\/'.$matches[1].'>[ ]*$/', $Line['text'])) + { + $Block['closed'] = true; + } + else + { + $Block['depth'] = 0; + $Block['start'] = '<'.$matches[1].'>'; + $Block['end'] = ''; + } + + return $Block; + } + } + + protected function addToMarkup($Line, array $Block) + { + if (isset($Block['closed'])) + { + return; + } + + if (stripos($Line['text'], $Block['start']) !== false) # opening tag + { + $Block['depth'] ++; + } + + if (stripos($Line['text'], $Block['end']) !== false) # closing tag + { + if ($Block['depth'] > 0) + { + $Block['depth'] --; + } + else + { + $Block['closed'] = true; + } + } + + $Block['element'] .= "\n".$Line['body']; + + return $Block; + } + + # + # Fenced Code + + protected function identifyFencedCode($Line) + { + if (preg_match('/^(['.$Line['text'][0].']{3,})[ ]*(\w+)?[ ]*$/', $Line['text'], $matches)) + { + $Element = array( + 'name' => 'code', + 'text' => '', + ); + + if (isset($matches[2])) + { + $class = 'language-'.$matches[2]; + + $Element['attributes'] = array( + 'class' => $class, + ); + } + + $Block = array( + 'char' => $Line['text'][0], + 'element' => array( + 'name' => 'pre', + 'handler' => 'element', + 'text' => $Element, + ), + ); + + return $Block; + } + } + + protected function addToFencedCode($Line, $Block) + { + if (isset($Block['complete'])) + { + return; + } + + if (isset($Block['interrupted'])) + { + $Block['element']['text']['text'] .= "\n"; + + unset($Block['interrupted']); + } + + if (preg_match('/^'.$Block['char'].'{3,}[ ]*$/', $Line['text'])) + { + $Block['element']['text']['text'] = substr($Block['element']['text']['text'], 1); + + $Block['complete'] = true; + + return $Block; + } + + $string = htmlspecialchars($Line['body'], ENT_NOQUOTES, 'UTF-8'); + + $Block['element']['text']['text'] .= "\n".$string;; + + return $Block; + } + + # + # List + + protected function identifyList($Line) + { + list($name, $pattern) = $Line['text'][0] <= '-' ? array('ul', '[*+-]') : array('ol', '[0-9]+[.]'); + + if (preg_match('/^('.$pattern.'[ ]+)(.*)/', $Line['text'], $matches)) + { + $Block = array( + 'indent' => $Line['indent'], + 'pattern' => $pattern, + 'element' => array( + 'name' => $name, + 'handler' => 'elements', + ), + ); + + $Block['li'] = array( + 'name' => 'li', + 'handler' => 'li', + 'text' => array( + $matches[2], + ), + ); + + $Block['element']['text'] []= & $Block['li']; + + return $Block; + } + } + + protected function addToList($Line, array $Block) + { + if ($Block['indent'] === $Line['indent'] and preg_match('/^'.$Block['pattern'].'[ ]+(.*)/', $Line['text'], $matches)) + { + if (isset($Block['interrupted'])) + { + $Block['li']['text'] []= ''; + + unset($Block['interrupted']); + } + + unset($Block['li']); + + $Block['li'] = array( + 'name' => 'li', + 'handler' => 'li', + 'text' => array( + $matches[1], + ), + ); + + $Block['element']['text'] []= & $Block['li']; + + return $Block; + } + + if ( ! isset($Block['interrupted'])) + { + $text = preg_replace('/^[ ]{0,2}/', '', $Line['body']); + + $Block['li']['text'] []= $text; + + return $Block; + } + + if ($Line['indent'] > 0) + { + $Block['li']['text'] []= ''; + + $text = preg_replace('/^[ ]{0,2}/', '', $Line['body']); + + $Block['li']['text'] []= $text; + + unset($Block['interrupted']); + + return $Block; + } + } + + # + # Quote + + protected function identifyQuote($Line) + { + if (preg_match('/^>[ ]?(.*)/', $Line['text'], $matches)) + { + $Block = array( + 'element' => array( + 'name' => 'blockquote', + 'handler' => 'lines', + 'text' => (array) $matches[1], + ), + ); + + return $Block; + } + } + + protected function addToQuote($Line, array $Block) + { + if ($Line['text'][0] === '>' and preg_match('/^>[ ]?(.*)/', $Line['text'], $matches)) + { + if (isset($Block['interrupted'])) + { + $Block['element']['text'] []= ''; + } + + $Block['element']['text'] []= $matches[1]; + + return $Block; + } + + if ( ! isset($Block['interrupted'])) + { + $Block['element']['text'] []= $Line['text']; + + return $Block; + } + } + + # + # Table + + protected function identifyTable($Line, array $Block = null) + { + if ( ! isset($Block) or $Block['type'] !== 'Paragraph' or isset($Block['interrupted'])) + { + return; + } + + if (strpos($Block['element']['text'], '|') !== false and chop($Line['text'], ' -:|') === '') + { + $alignments = array(); + + $divider = $Line['text']; + + $divider = trim($divider); + $divider = trim($divider, '|'); + + $dividerCells = explode('|', $divider); + + foreach ($dividerCells as $dividerCell) + { + $dividerCell = trim($dividerCell); + + if ($dividerCell === '') + { + continue; + } + + $alignment = null; + + if ($dividerCell[0] === ':') + { + $alignment = 'left'; + } + + if (substr($dividerCell, -1) === ':') + { + $alignment = $alignment === 'left' ? 'center' : 'right'; + } + + $alignments []= $alignment; + } + + # ~ + + $HeaderElements = array(); + + $header = $Block['element']['text']; + + $header = trim($header); + $header = trim($header, '|'); + + $headerCells = explode('|', $header); + + foreach ($headerCells as $index => $headerCell) + { + $headerCell = trim($headerCell); + + $HeaderElement = array( + 'name' => 'th', + 'text' => $headerCell, + 'handler' => 'line', + ); + + if (isset($alignments[$index])) + { + $alignment = $alignments[$index]; + + $HeaderElement['attributes'] = array( + 'align' => $alignment, + ); + } + + $HeaderElements []= $HeaderElement; + } + + # ~ + + $Block = array( + 'alignments' => $alignments, + 'identified' => true, + 'element' => array( + 'name' => 'table', + 'handler' => 'elements', + ), + ); + + $Block['element']['text'] []= array( + 'name' => 'thead', + 'handler' => 'elements', + ); + + $Block['element']['text'] []= array( + 'name' => 'tbody', + 'handler' => 'elements', + 'text' => array(), + ); + + $Block['element']['text'][0]['text'] []= array( + 'name' => 'tr', + 'handler' => 'elements', + 'text' => $HeaderElements, + ); + + return $Block; + } + } + + protected function addToTable($Line, array $Block) + { + if ($Line['text'][0] === '|' or strpos($Line['text'], '|')) + { + $Elements = array(); + + $row = $Line['text']; + + $row = trim($row); + $row = trim($row, '|'); + + $cells = explode('|', $row); + + foreach ($cells as $index => $cell) + { + $cell = trim($cell); + + $Element = array( + 'name' => 'td', + 'handler' => 'line', + 'text' => $cell, + ); + + if (isset($Block['alignments'][$index])) + { + $Element['attributes'] = array( + 'align' => $Block['alignments'][$index], + ); + } + + $Elements []= $Element; + } + + $Element = array( + 'name' => 'tr', + 'handler' => 'elements', + 'text' => $Elements, + ); + + $Block['element']['text'][1]['text'] []= $Element; + + return $Block; + } + } + + # + # Code + + protected function identifyCodeBlock($Line) + { + if ($Line['indent'] >= 4) + { + $text = substr($Line['body'], 4); + $text = htmlspecialchars($text, ENT_NOQUOTES, 'UTF-8'); + + $Block = array( + 'element' => array( + 'name' => 'pre', + 'handler' => 'element', + 'text' => array( + 'name' => 'code', + 'text' => $text, + ), + ), + ); + + return $Block; + } + } + + protected function addToCodeBlock($Line, $Block) + { + if ($Line['indent'] >= 4) + { + if (isset($Block['interrupted'])) + { + $Block['element']['text']['text'] .= "\n"; + + unset($Block['interrupted']); + } + + $Block['element']['text']['text'] .= "\n"; + + $text = substr($Line['body'], 4); + $text = htmlspecialchars($text, ENT_NOQUOTES, 'UTF-8'); + + $Block['element']['text']['text'] .= $text; + + return $Block; + } + } + + # + # ~ + # + + private function element(array $Element) + { + $markup = '<'.$Element['name']; + + if (isset($Element['attributes'])) + { + foreach ($Element['attributes'] as $name => $value) + { + $markup .= ' '.$name.'="'.$value.'"'; + } + } + + if (isset($Element['text'])) + { + $markup .= '>'; + + if (isset($Element['handler'])) + { + $markup .= $this->$Element['handler']($Element['text']); + } + else + { + $markup .= $Element['text']; + } + + $markup .= ''; + } + else + { + $markup .= ' />'; + } + + return $markup; + } + + private function elements(array $Elements) + { + $markup = ''; + + foreach ($Elements as $Element) + { + if ($Element === null) + { + continue; + } + + $markup .= "\n"; + + if (is_string($Element)) # because of markup + { + $markup .= $Element; + + continue; + } + + $markup .= $this->element($Element); + } + + $markup .= "\n"; + + return $markup; + } + + # + # Spans + # + + protected $spanMarkers = array( + '!' => array('Link'), # ? + '&' => array('Ampersand'), + '*' => array('Emphasis'), + '/' => array('Url'), + '<' => array('UrlTag', 'EmailTag', 'Tag', 'LessThan'), + '[' => array('Link'), + '_' => array('Emphasis'), + '`' => array('InlineCode'), + '~' => array('Strikethrough'), + '\\' => array('EscapeSequence'), + ); + + protected $spanMarkerList = '*_!&[spanMarkerList)) + { + $marker = $markedExcerpt[0]; + + $markerPosition += strpos($remainder, $marker); + + foreach ($this->spanMarkers[$marker] as $spanType) + { + $handler = 'identify'.$spanType; + + $Span = $this->$handler($markedExcerpt, $text); + + if (isset($Span)) + { + # The identified span can be ahead of the marker. + + if (isset($Span['position']) and $Span['position'] > $markerPosition) + { + continue; + } + + # Spans that start at the position of their marker don't have to set a position. + + if ( ! isset($Span['position'])) + { + $Span['position'] = $markerPosition; + } + + $unmarkedText = substr($text, 0, $Span['position']); + + $markup .= $this->readPlainText($unmarkedText); + + $markup .= isset($Span['element']) ? $this->element($Span['element']) : $Span['markup']; + + $text = substr($text, $Span['position'] + $Span['extent']); + + $remainder = $text; + + $markerPosition = 0; + + continue 2; + } + } + + $remainder = substr($markedExcerpt, 1); + + $markerPosition ++; + } + + $markup .= $this->readPlainText($text); + + return $markup; + } + + # + # ~ + # + + protected function identifyUrl($excerpt, $text) + { + if ( ! isset($excerpt[1]) or $excerpt[1] !== '/') + { + return; + } + + if (preg_match('/\bhttps?:[\/]{2}[^\s]+\b\/*/ui', $text, $matches, PREG_OFFSET_CAPTURE)) + { + $url = str_replace(array('&', '<'), array('&', '<'), $matches[0][0]); + + return array( + 'extent' => strlen($matches[0][0]), + 'position' => $matches[0][1], + 'element' => array( + 'name' => 'a', + 'text' => $url, + 'attributes' => array( + 'href' => $url, + ), + ), + ); + } + } + + protected function identifyAmpersand($excerpt) + { + if ( ! preg_match('/^&#?\w+;/', $excerpt)) + { + return array( + 'markup' => '&', + 'extent' => 1, + ); + } + } + + protected function identifyStrikethrough($excerpt) + { + if ( ! isset($excerpt[1])) + { + return; + } + + if ($excerpt[1] === $excerpt[0] and preg_match('/^~~(?=\S)(.+?)(?<=\S)~~/', $excerpt, $matches)) + { + return array( + 'extent' => strlen($matches[0]), + 'element' => array( + 'name' => 'del', + 'text' => $matches[1], + 'handler' => 'line', + ), + ); + } + } + + protected function identifyEscapeSequence($excerpt) + { + if (in_array($excerpt[1], $this->specialCharacters)) + { + return array( + 'markup' => $excerpt[1], + 'extent' => 2, + ); + } + } + + protected function identifyLessThan() + { + return array( + 'markup' => '<', + 'extent' => 1, + ); + } + + protected function identifyUrlTag($excerpt) + { + if (strpos($excerpt, '>') !== false and preg_match('/^<(https?:[\/]{2}[^\s]+?)>/i', $excerpt, $matches)) + { + $url = str_replace(array('&', '<'), array('&', '<'), $matches[1]); + + return array( + 'extent' => strlen($matches[0]), + 'element' => array( + 'name' => 'a', + 'text' => $url, + 'attributes' => array( + 'href' => $url, + ), + ), + ); + } + } + + protected function identifyEmailTag($excerpt) + { + if (strpos($excerpt, '>') !== false and preg_match('/<(\S+?@\S+?)>/', $excerpt, $matches)) + { + return array( + 'extent' => strlen($matches[0]), + 'element' => array( + 'name' => 'a', + 'text' => $matches[1], + 'attributes' => array( + 'href' => 'mailto:'.$matches[1], + ), + ), + ); + } + } + + protected function identifyTag($excerpt) + { + if (strpos($excerpt, '>') !== false and preg_match('/^<\/?\w.*?>/', $excerpt, $matches)) + { + return array( + 'markup' => $matches[0], + 'extent' => strlen($matches[0]), + ); + } + } + + protected function identifyInlineCode($excerpt) + { + $marker = $excerpt[0]; + + if (preg_match('/^('.$marker.'+)[ ]*(.+?)[ ]*(? strlen($matches[0]), + 'element' => array( + 'name' => 'code', + 'text' => $text, + ), + ); + } + } + + protected function identifyLink($excerpt) + { + $extent = $excerpt[0] === '!' ? 1 : 0; + + if (strpos($excerpt, ']') and preg_match('/\[((?:[^][]|(?R))*)\]/', $excerpt, $matches)) + { + $Link = array('text' => $matches[1], 'label' => strtolower($matches[1])); + + $extent += strlen($matches[0]); + + $substring = substr($excerpt, $extent); + + if (preg_match('/^\s*\[(.+?)\]/', $substring, $matches)) + { + $Link['label'] = strtolower($matches[1]); + + if (isset($this->references[$Link['label']])) + { + $Link += $this->references[$Link['label']]; + + $extent += strlen($matches[0]); + } + else + { + return; + } + } + elseif ($this->references and isset($this->references[$Link['label']])) + { + $Link += $this->references[$Link['label']]; + + if (preg_match('/^[ ]*\[\]/', $substring, $matches)) + { + $extent += strlen($matches[0]); + } + } + elseif (preg_match('/^\([ ]*(.*?)(?:[ ]+[\'"](.+?)[\'"])?[ ]*\)/', $substring, $matches)) + { + $Link['url'] = $matches[1]; + + if (isset($matches[2])) + { + $Link['title'] = $matches[2]; + } + + $extent += strlen($matches[0]); + } + else + { + return; + } + } + else + { + return; + } + + $url = str_replace(array('&', '<'), array('&', '<'), $Link['url']); + + if ($excerpt[0] === '!') + { + $Element = array( + 'name' => 'img', + 'attributes' => array( + 'alt' => $Link['text'], + 'src' => $url, + ), + ); + } + else + { + $Element = array( + 'name' => 'a', + 'handler' => 'line', + 'text' => $Link['text'], + 'attributes' => array( + 'href' => $url, + ), + ); + } + + if (isset($Link['title'])) + { + $Element['attributes']['title'] = $Link['title']; + } + + return array( + 'extent' => $extent, + 'element' => $Element, + ); + } + + protected function identifyEmphasis($excerpt) + { + if ( ! isset($excerpt[1])) + { + return; + } + + $marker = $excerpt[0]; + + if ($excerpt[1] === $marker and preg_match($this->strongRegex[$marker], $excerpt, $matches)) + { + $emphasis = 'strong'; + } + elseif (preg_match($this->emRegex[$marker], $excerpt, $matches)) + { + $emphasis = 'em'; + } + else + { + return; + } + + return array( + 'extent' => strlen($matches[0]), + 'element' => array( + 'name' => $emphasis, + 'handler' => 'line', + 'text' => $matches[1], + ), + ); + } + + # + # ~ + + protected function readPlainText($text) + { + $breakMarker = $this->breaksEnabled ? "\n" : " \n"; + + $text = str_replace($breakMarker, "
\n", $text); + + return $text; + } + + # + # ~ + # + + protected function li($lines) + { + $markup = $this->lines($lines); + + $trimmedMarkup = trim($markup); + + if ( ! in_array('', $lines) and substr($trimmedMarkup, 0, 3) === '

') + { + $markup = $trimmedMarkup; + $markup = substr($markup, 3); + + $position = strpos($markup, "

"); + + $markup = substr_replace($markup, '', $position, 4); + } + + return $markup; + } + + # + # Multiton + # + + static function instance($name = 'default') + { + if (isset(self::$instances[$name])) + { + return self::$instances[$name]; + } + + $instance = new self(); + + self::$instances[$name] = $instance; + + return $instance; + } + + private static $instances = array(); + + # + # Deprecated Methods + # + + /** + * @deprecated in favor of "text" + */ + function parse($text) + { + $markup = $this->text($text); + + return $markup; + } + + # + # Fields + # + + protected $references = array(); # » Definitions['reference'] + + # + # Read-only + + protected $specialCharacters = array( + '\\', '`', '*', '_', '{', '}', '[', ']', '(', ')', '>', '#', '+', '-', '.', '!', + ); + + protected $strongRegex = array( + '*' => '/^[*]{2}((?:[^*]|[*][^*]*[*])+?)[*]{2}(?![*])/s', + '_' => '/^__((?:[^_]|_[^_]*_)+?)__(?!_)/us', + ); + + protected $emRegex = array( + '*' => '/^[*]((?:[^*]|[*][*][^*]+?[*][*])+?)[*](?![*])/s', + '_' => '/^_((?:[^_]|__[^_]*__)+?)_(?!_)\b/us', + ); + + protected $textLevelElements = array( + 'a', 'br', 'bdo', 'abbr', 'blink', 'nextid', 'acronym', 'basefont', + 'b', 'em', 'big', 'cite', 'small', 'spacer', 'listing', + 'i', 'rp', 'sub', 'code', 'strike', 'marquee', + 'q', 'rt', 'sup', 'font', 'strong', + 's', 'tt', 'var', 'mark', + 'u', 'xm', 'wbr', 'nobr', + 'ruby', + 'span', + 'time', + ); +} diff --git a/vendor/erusev/parsedown/README.md b/vendor/erusev/parsedown/README.md new file mode 100644 index 0000000..aa5a626 --- /dev/null +++ b/vendor/erusev/parsedown/README.md @@ -0,0 +1,26 @@ +## 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, 5.6 and [hhvm](http://www.hhvm.com/) +* Extensible + +### 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:

Hello Parsedown!

+``` diff --git a/vendor/erusev/parsedown/composer.json b/vendor/erusev/parsedown/composer.json new file mode 100644 index 0000000..1439b82 --- /dev/null +++ b/vendor/erusev/parsedown/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/erusev/parsedown/phpunit.xml.dist b/vendor/erusev/parsedown/phpunit.xml.dist new file mode 100644 index 0000000..4c55dc2 --- /dev/null +++ b/vendor/erusev/parsedown/phpunit.xml.dist @@ -0,0 +1,8 @@ + + + + + tests/Test.php + + + \ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/Test.php b/vendor/erusev/parsedown/tests/Test.php new file mode 100644 index 0000000..1aa2404 --- /dev/null +++ b/vendor/erusev/parsedown/tests/Test.php @@ -0,0 +1,67 @@ +dataDir = dirname(__FILE__).'/data/'; + + parent::__construct($name, $data, $dataName); + } + + private $dataDir; + + /** + * @dataProvider data + */ + function test_($filename) + { + $markdown = file_get_contents($this->dataDir . $filename . '.md'); + + $expectedMarkup = file_get_contents($this->dataDir . $filename . '.html'); + + $expectedMarkup = str_replace("\r\n", "\n", $expectedMarkup); + $expectedMarkup = str_replace("\r", "\n", $expectedMarkup); + + $actualMarkup = Parsedown::instance()->text($markdown); + + $this->assertEquals($expectedMarkup, $actualMarkup); + } + + function data() + { + $data = array(); + + $Folder = new DirectoryIterator($this->dataDir); + + 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($this->dataDir . $basename . '.html')) + { + $data []= array($basename); + } + } + + return $data; + } +} diff --git a/vendor/erusev/parsedown/tests/data/aesthetic_table.html b/vendor/erusev/parsedown/tests/data/aesthetic_table.html new file mode 100644 index 0000000..88e1c2b --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/aesthetic_table.html @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + +
header 1header 2
cell 1.1cell 1.2
cell 2.1cell 2.2
\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/aesthetic_table.md b/vendor/erusev/parsedown/tests/data/aesthetic_table.md new file mode 100644 index 0000000..5245e6c --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/aesthetic_table.md @@ -0,0 +1,4 @@ +| header 1 | header 2 | +| -------- | -------- | +| cell 1.1 | cell 1.2 | +| cell 2.1 | cell 2.2 | \ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/aligned_table.html b/vendor/erusev/parsedown/tests/data/aligned_table.html new file mode 100644 index 0000000..0657bd1 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/aligned_table.html @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + +
header 1header 2header 2
cell 1.1cell 1.2cell 1.3
cell 2.1cell 2.2cell 2.3
\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/aligned_table.md b/vendor/erusev/parsedown/tests/data/aligned_table.md new file mode 100644 index 0000000..69a45f9 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/aligned_table.md @@ -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 | \ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/atx_heading.html b/vendor/erusev/parsedown/tests/data/atx_heading.html new file mode 100644 index 0000000..22d865d --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/atx_heading.html @@ -0,0 +1,8 @@ +

h1

+

h2

+

h3

+

h4

+
h5
+
h6
+

closed h1

+

#

\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/atx_heading.md b/vendor/erusev/parsedown/tests/data/atx_heading.md new file mode 100644 index 0000000..039baaa --- /dev/null +++ b/vendor/erusev/parsedown/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/erusev/parsedown/tests/data/automatic_link.html b/vendor/erusev/parsedown/tests/data/automatic_link.html new file mode 100644 index 0000000..50a94ba --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/automatic_link.html @@ -0,0 +1 @@ +

http://example.com

\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/automatic_link.md b/vendor/erusev/parsedown/tests/data/automatic_link.md new file mode 100644 index 0000000..08d3bf4 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/automatic_link.md @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/block-level_html.html b/vendor/erusev/parsedown/tests/data/block-level_html.html new file mode 100644 index 0000000..c4ccf54 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/block-level_html.html @@ -0,0 +1,5 @@ +
_content_
+

sparse:

+
+_content_ +
\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/block-level_html.md b/vendor/erusev/parsedown/tests/data/block-level_html.md new file mode 100644 index 0000000..40ba893 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/block-level_html.md @@ -0,0 +1,7 @@ +
_content_
+ +sparse: + +
+_content_ +
\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/code_block.html b/vendor/erusev/parsedown/tests/data/code_block.html new file mode 100644 index 0000000..889b02d --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/code_block.html @@ -0,0 +1,8 @@ +
<?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/erusev/parsedown/tests/data/code_block.md b/vendor/erusev/parsedown/tests/data/code_block.md new file mode 100644 index 0000000..2cfc953 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/code_block.md @@ -0,0 +1,10 @@ + not a quote + - not a list item + [not a reference]: http://foo.com \ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/code_span.html b/vendor/erusev/parsedown/tests/data/code_span.html new file mode 100644 index 0000000..5c4c231 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/code_span.html @@ -0,0 +1,6 @@ +

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

\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/code_span.md b/vendor/erusev/parsedown/tests/data/code_span.md new file mode 100644 index 0000000..c2f1a74 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/code_span.md @@ -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` \ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/compound_blockquote.html b/vendor/erusev/parsedown/tests/data/compound_blockquote.html new file mode 100644 index 0000000..37afb57 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/compound_blockquote.html @@ -0,0 +1,9 @@ +
+

header

+

paragraph

+
    +
  • li
  • +
+
+

paragraph

+
\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/compound_blockquote.md b/vendor/erusev/parsedown/tests/data/compound_blockquote.md new file mode 100644 index 0000000..80c4aed --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/compound_blockquote.md @@ -0,0 +1,10 @@ +> header +> ------ +> +> paragraph +> +> - li +> +> --- +> +> paragraph \ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/compound_emphasis.html b/vendor/erusev/parsedown/tests/data/compound_emphasis.html new file mode 100644 index 0000000..178dd54 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/compound_emphasis.html @@ -0,0 +1,2 @@ +

code code

+

codecodecode

\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/compound_emphasis.md b/vendor/erusev/parsedown/tests/data/compound_emphasis.md new file mode 100644 index 0000000..6fe07f2 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/compound_emphasis.md @@ -0,0 +1,4 @@ +_`code`_ __`code`__ + +*`code`**`code`**`code`* + diff --git a/vendor/erusev/parsedown/tests/data/compound_list.html b/vendor/erusev/parsedown/tests/data/compound_list.html new file mode 100644 index 0000000..f5593c1 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/compound_list.html @@ -0,0 +1,12 @@ +
    +
  • +

    paragraph

    +

    paragraph

    +
  • +
  • +

    paragraph

    +
    +

    quote

    +
    +
  • +
\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/compound_list.md b/vendor/erusev/parsedown/tests/data/compound_list.md new file mode 100644 index 0000000..ed7f0c6 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/compound_list.md @@ -0,0 +1,7 @@ +- paragraph + + paragraph + +- paragraph + + > quote \ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/deeply_nested_list.html b/vendor/erusev/parsedown/tests/data/deeply_nested_list.html new file mode 100644 index 0000000..d2c7e5a --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/deeply_nested_list.html @@ -0,0 +1,12 @@ +
    +
  • li +
      +
    • li +
        +
      • li
      • +
      • li
      • +
    • +
    • li
    • +
  • +
  • li
  • +
\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/deeply_nested_list.md b/vendor/erusev/parsedown/tests/data/deeply_nested_list.md new file mode 100644 index 0000000..c761dc7 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/deeply_nested_list.md @@ -0,0 +1,6 @@ +- li + - li + - li + - li + - li +- li \ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/em_strong.html b/vendor/erusev/parsedown/tests/data/em_strong.html new file mode 100644 index 0000000..323d60a --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/em_strong.html @@ -0,0 +1,8 @@ +

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/erusev/parsedown/tests/data/em_strong.md b/vendor/erusev/parsedown/tests/data/em_strong.md new file mode 100644 index 0000000..9abeb3f --- /dev/null +++ b/vendor/erusev/parsedown/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/erusev/parsedown/tests/data/email.html b/vendor/erusev/parsedown/tests/data/email.html new file mode 100644 index 0000000..c40759c --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/email.html @@ -0,0 +1 @@ +

my email is me@example.com

\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/email.md b/vendor/erusev/parsedown/tests/data/email.md new file mode 100644 index 0000000..26b7b6c --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/email.md @@ -0,0 +1 @@ +my email is \ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/emphasis.html b/vendor/erusev/parsedown/tests/data/emphasis.html new file mode 100644 index 0000000..60ff4bd --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/emphasis.html @@ -0,0 +1,8 @@ +

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/erusev/parsedown/tests/data/emphasis.md b/vendor/erusev/parsedown/tests/data/emphasis.md new file mode 100644 index 0000000..85b9d22 --- /dev/null +++ b/vendor/erusev/parsedown/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/erusev/parsedown/tests/data/escaping.html b/vendor/erusev/parsedown/tests/data/escaping.html new file mode 100644 index 0000000..64676cb --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/escaping.html @@ -0,0 +1,4 @@ +

escaped *emphasis*.

+

escaped \*emphasis\* in a code span

+
escaped \*emphasis\* in a code block
+

\ ` * _ { } [ ] ( ) > # + - . !

\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/escaping.md b/vendor/erusev/parsedown/tests/data/escaping.md new file mode 100644 index 0000000..164039f --- /dev/null +++ b/vendor/erusev/parsedown/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/erusev/parsedown/tests/data/fenced_code_block.html b/vendor/erusev/parsedown/tests/data/fenced_code_block.html new file mode 100644 index 0000000..8bdabba --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/fenced_code_block.html @@ -0,0 +1,6 @@ +
<?php
+
+$message = 'fenced code block';
+echo $message;
+
tilde
+
echo 'language identifier';
\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/fenced_code_block.md b/vendor/erusev/parsedown/tests/data/fenced_code_block.md new file mode 100644 index 0000000..cbed8eb --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/fenced_code_block.md @@ -0,0 +1,14 @@ +``` + +
+
+
+
\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/horizontal_rule.md b/vendor/erusev/parsedown/tests/data/horizontal_rule.md new file mode 100644 index 0000000..bf461a9 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/horizontal_rule.md @@ -0,0 +1,9 @@ +--- + +- - - + + - - - + +*** + +___ \ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/html_entity.html b/vendor/erusev/parsedown/tests/data/html_entity.html new file mode 100644 index 0000000..4d23e3c --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/html_entity.html @@ -0,0 +1 @@ +

& © {

\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/html_entity.md b/vendor/erusev/parsedown/tests/data/html_entity.md new file mode 100644 index 0000000..ff545ea --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/html_entity.md @@ -0,0 +1 @@ +& © { \ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/html_simple.html b/vendor/erusev/parsedown/tests/data/html_simple.html new file mode 100644 index 0000000..61e50b6 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/html_simple.html @@ -0,0 +1,28 @@ +

Headings:

+

Overview

+

blah

+

Block Elements

+

blah

+

+ Span Elements +

+

blah

+

Hr's:

+
+

blah

+
+

blah

+
+

blah

+
+

blah

+
+

blah

+
+

blah

+
+

blah

+
+

blah

+
+

blah

\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/html_simple.md b/vendor/erusev/parsedown/tests/data/html_simple.md new file mode 100644 index 0000000..7b930df --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/html_simple.md @@ -0,0 +1,39 @@ +Headings: + +

Overview

+blah +

Block Elements

+blah +

+ Span Elements +

+blah + +Hr's: + +
+blah + +
+blah + +
+blah + +
+blah + +
+blah + +
+blah + +
+blah + +
+blah + +
+blah diff --git a/vendor/erusev/parsedown/tests/data/image_reference.html b/vendor/erusev/parsedown/tests/data/image_reference.html new file mode 100644 index 0000000..b3249cb --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/image_reference.html @@ -0,0 +1 @@ +

Markdown Logo

\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/image_reference.md b/vendor/erusev/parsedown/tests/data/image_reference.md new file mode 100644 index 0000000..dcb1414 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/image_reference.md @@ -0,0 +1,3 @@ +![Markdown Logo][image] + +[image]: /md.png diff --git a/vendor/erusev/parsedown/tests/data/image_title.html b/vendor/erusev/parsedown/tests/data/image_title.html new file mode 100644 index 0000000..82c155f --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/image_title.html @@ -0,0 +1 @@ +

alt

\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/image_title.md b/vendor/erusev/parsedown/tests/data/image_title.md new file mode 100644 index 0000000..3e58ee5 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/image_title.md @@ -0,0 +1 @@ +![alt](/md.png "title") \ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/implicit_reference.html b/vendor/erusev/parsedown/tests/data/implicit_reference.html new file mode 100644 index 0000000..209b85e --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/implicit_reference.html @@ -0,0 +1,3 @@ +

an implicit reference link

+

an implicit reference link with an empty link definition

+

an explicit reference link with a title

\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/implicit_reference.md b/vendor/erusev/parsedown/tests/data/implicit_reference.md new file mode 100644 index 0000000..d128826 --- /dev/null +++ b/vendor/erusev/parsedown/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/erusev/parsedown/tests/data/inline_link.html b/vendor/erusev/parsedown/tests/data/inline_link.html new file mode 100644 index 0000000..2b9e649 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/inline_link.html @@ -0,0 +1,4 @@ +

link and another link

+

link

+

MD Logo

+

MD Logo and text

\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/inline_link.md b/vendor/erusev/parsedown/tests/data/inline_link.md new file mode 100644 index 0000000..cd8e5a6 --- /dev/null +++ b/vendor/erusev/parsedown/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/erusev/parsedown/tests/data/inline_link_title.html b/vendor/erusev/parsedown/tests/data/inline_link_title.html new file mode 100644 index 0000000..70e589a --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/inline_link_title.html @@ -0,0 +1 @@ +

single quotes and double quotes

\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/inline_link_title.md b/vendor/erusev/parsedown/tests/data/inline_link_title.md new file mode 100644 index 0000000..162b832 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/inline_link_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/erusev/parsedown/tests/data/inline_title.html b/vendor/erusev/parsedown/tests/data/inline_title.html new file mode 100644 index 0000000..bbab93b --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/inline_title.html @@ -0,0 +1 @@ +

single quotes and double quotes

\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/inline_title.md b/vendor/erusev/parsedown/tests/data/inline_title.md new file mode 100644 index 0000000..cb09344 --- /dev/null +++ b/vendor/erusev/parsedown/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/erusev/parsedown/tests/data/lazy_blockquote.html b/vendor/erusev/parsedown/tests/data/lazy_blockquote.html new file mode 100644 index 0000000..c368a0b --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/lazy_blockquote.html @@ -0,0 +1,4 @@ +
+

quote +the rest of it

+
\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/lazy_blockquote.md b/vendor/erusev/parsedown/tests/data/lazy_blockquote.md new file mode 100644 index 0000000..8490c22 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/lazy_blockquote.md @@ -0,0 +1,2 @@ +> quote +the rest of it \ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/lazy_list.html b/vendor/erusev/parsedown/tests/data/lazy_list.html new file mode 100644 index 0000000..1a51992 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/lazy_list.html @@ -0,0 +1,4 @@ +
    +
  • li +the rest of it
  • +
\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/lazy_list.md b/vendor/erusev/parsedown/tests/data/lazy_list.md new file mode 100644 index 0000000..62ad9d7 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/lazy_list.md @@ -0,0 +1,2 @@ +- li +the rest of it \ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/line_break.html b/vendor/erusev/parsedown/tests/data/line_break.html new file mode 100644 index 0000000..5f37d85 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/line_break.html @@ -0,0 +1,2 @@ +

line
+line

\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/line_break.md b/vendor/erusev/parsedown/tests/data/line_break.md new file mode 100644 index 0000000..04dff43 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/line_break.md @@ -0,0 +1,2 @@ +line +line \ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/multiline_list_paragraph.html b/vendor/erusev/parsedown/tests/data/multiline_list_paragraph.html new file mode 100644 index 0000000..3247bd2 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/multiline_list_paragraph.html @@ -0,0 +1,7 @@ +
    +
  • +

    li

    +

    line +line

    +
  • +
\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/multiline_list_paragraph.md b/vendor/erusev/parsedown/tests/data/multiline_list_paragraph.md new file mode 100644 index 0000000..f5b4272 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/multiline_list_paragraph.md @@ -0,0 +1,4 @@ +- li + + line + line \ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/nested_block-level_html.html b/vendor/erusev/parsedown/tests/data/nested_block-level_html.html new file mode 100644 index 0000000..bfbef54 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/nested_block-level_html.html @@ -0,0 +1,10 @@ +
+_parent_ +
+_child_ +
+
+_adopted child_
+
+
+

outside

\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/nested_block-level_html.md b/vendor/erusev/parsedown/tests/data/nested_block-level_html.md new file mode 100644 index 0000000..5e01e10 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/nested_block-level_html.md @@ -0,0 +1,11 @@ +
+_parent_ +
+_child_ +
+
+_adopted child_
+
+
+ +_outside_ \ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/ordered_list.html b/vendor/erusev/parsedown/tests/data/ordered_list.html new file mode 100644 index 0000000..b6c5216 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/ordered_list.html @@ -0,0 +1,13 @@ +
    +
  1. one
  2. +
  3. two
  4. +
+

repeating numbers:

+
    +
  1. one
  2. +
  3. two
  4. +
+

large numbers:

+
    +
  1. one
  2. +
\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/ordered_list.md b/vendor/erusev/parsedown/tests/data/ordered_list.md new file mode 100644 index 0000000..b307032 --- /dev/null +++ b/vendor/erusev/parsedown/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/erusev/parsedown/tests/data/paragraph_list.html b/vendor/erusev/parsedown/tests/data/paragraph_list.html new file mode 100644 index 0000000..ced1c43 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/paragraph_list.html @@ -0,0 +1,12 @@ +

paragraph

+
    +
  • li
  • +
  • li
  • +
+

paragraph

+
    +
  • +

    li

    +
  • +
  • li
  • +
\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/paragraph_list.md b/vendor/erusev/parsedown/tests/data/paragraph_list.md new file mode 100644 index 0000000..b973908 --- /dev/null +++ b/vendor/erusev/parsedown/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/erusev/parsedown/tests/data/reference_title.html b/vendor/erusev/parsedown/tests/data/reference_title.html new file mode 100644 index 0000000..8f2be94 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/reference_title.html @@ -0,0 +1,2 @@ +

double quotes and single quotes and parentheses

+

[invalid title]: http://example.com example title

\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/reference_title.md b/vendor/erusev/parsedown/tests/data/reference_title.md new file mode 100644 index 0000000..43cb217 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/reference_title.md @@ -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 \ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/self-closing_block-level_html.html b/vendor/erusev/parsedown/tests/data/self-closing_block-level_html.html new file mode 100644 index 0000000..c3cb1f4 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/self-closing_block-level_html.html @@ -0,0 +1,4 @@ +
+

attributes:

+
+

...

\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/self-closing_block-level_html.md b/vendor/erusev/parsedown/tests/data/self-closing_block-level_html.md new file mode 100644 index 0000000..95f00ec --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/self-closing_block-level_html.md @@ -0,0 +1,7 @@ +
+ +attributes: + +
+ +... \ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/setext_header.html b/vendor/erusev/parsedown/tests/data/setext_header.html new file mode 100644 index 0000000..60aac08 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/setext_header.html @@ -0,0 +1,5 @@ +

h1

+

h2

+

single character

+

not a header

+
\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/setext_header.md b/vendor/erusev/parsedown/tests/data/setext_header.md new file mode 100644 index 0000000..c43b52c --- /dev/null +++ b/vendor/erusev/parsedown/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/erusev/parsedown/tests/data/simple_blockquote.html b/vendor/erusev/parsedown/tests/data/simple_blockquote.html new file mode 100644 index 0000000..8225d57 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/simple_blockquote.html @@ -0,0 +1,11 @@ +
+

quote

+
+

indented:

+
+

quote

+
+

no space after >:

+
+

quote

+
\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/simple_blockquote.md b/vendor/erusev/parsedown/tests/data/simple_blockquote.md new file mode 100644 index 0000000..22b6b11 --- /dev/null +++ b/vendor/erusev/parsedown/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/erusev/parsedown/tests/data/simple_table.html b/vendor/erusev/parsedown/tests/data/simple_table.html new file mode 100644 index 0000000..64b7a9a --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/simple_table.html @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + +
header 1header 2
cell 1.1cell 1.2
cell 2.1cell 2.2
+
+ + + + + + + + + + + + + + + + + +
header 1header 2
cell 1.1cell 1.2
cell 2.1cell 2.2
\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/simple_table.md b/vendor/erusev/parsedown/tests/data/simple_table.md new file mode 100644 index 0000000..466d140 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/simple_table.md @@ -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 \ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/span-level_html.html b/vendor/erusev/parsedown/tests/data/span-level_html.html new file mode 100644 index 0000000..590b634 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/span-level_html.html @@ -0,0 +1,4 @@ +

an important link

+

broken
+line

+

inline tag at the beginning

\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/span-level_html.md b/vendor/erusev/parsedown/tests/data/span-level_html.md new file mode 100644 index 0000000..aadf6fc --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/span-level_html.md @@ -0,0 +1,6 @@ +an important link + +broken
+line + +inline tag at the beginning \ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/sparse_dense_list.html b/vendor/erusev/parsedown/tests/data/sparse_dense_list.html new file mode 100644 index 0000000..095bc73 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/sparse_dense_list.html @@ -0,0 +1,7 @@ +
    +
  • +

    li

    +
  • +
  • li
  • +
  • li
  • +
\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/sparse_dense_list.md b/vendor/erusev/parsedown/tests/data/sparse_dense_list.md new file mode 100644 index 0000000..5768422 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/sparse_dense_list.md @@ -0,0 +1,4 @@ +- li + +- li +- li \ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/sparse_list.html b/vendor/erusev/parsedown/tests/data/sparse_list.html new file mode 100644 index 0000000..452b2b8 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/sparse_list.html @@ -0,0 +1,15 @@ +
    +
  • +

    li

    +
  • +
  • li
  • +
+
+
    +
  • +

    li

    +
      +
    • indented li
    • +
    +
  • +
\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/sparse_list.md b/vendor/erusev/parsedown/tests/data/sparse_list.md new file mode 100644 index 0000000..362a35f --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/sparse_list.md @@ -0,0 +1,9 @@ +- li + +- li + +--- + +- li + + - indented li \ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/special_characters.html b/vendor/erusev/parsedown/tests/data/special_characters.html new file mode 100644 index 0000000..8199abc --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/special_characters.html @@ -0,0 +1,6 @@ +

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

+

reference link

\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/special_characters.md b/vendor/erusev/parsedown/tests/data/special_characters.md new file mode 100644 index 0000000..111b03b --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/special_characters.md @@ -0,0 +1,13 @@ +AT&T has an ampersand in their name + +this & that + +4 < 5 and 6 > 5 + + + +[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/erusev/parsedown/tests/data/strikethrough.html b/vendor/erusev/parsedown/tests/data/strikethrough.html new file mode 100644 index 0000000..2a9da98 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/strikethrough.html @@ -0,0 +1,3 @@ +

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/erusev/parsedown/tests/data/strikethrough.md b/vendor/erusev/parsedown/tests/data/strikethrough.md new file mode 100644 index 0000000..d169144 --- /dev/null +++ b/vendor/erusev/parsedown/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/erusev/parsedown/tests/data/strong_em.html b/vendor/erusev/parsedown/tests/data/strong_em.html new file mode 100644 index 0000000..b709c99 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/strong_em.html @@ -0,0 +1,6 @@ +

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/erusev/parsedown/tests/data/strong_em.md b/vendor/erusev/parsedown/tests/data/strong_em.md new file mode 100644 index 0000000..f2aa3c7 --- /dev/null +++ b/vendor/erusev/parsedown/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/erusev/parsedown/tests/data/tab-indented_code_block.html b/vendor/erusev/parsedown/tests/data/tab-indented_code_block.html new file mode 100644 index 0000000..7c140de --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/tab-indented_code_block.html @@ -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/erusev/parsedown/tests/data/tab-indented_code_block.md b/vendor/erusev/parsedown/tests/data/tab-indented_code_block.md new file mode 100644 index 0000000..a405a16 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/tab-indented_code_block.md @@ -0,0 +1,6 @@ + + + +header 1 +header 2 + + + + +cell 1.1 +cell 1.2 + + +cell 2.1 +cell 2.2 + + + \ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/table_inline_markdown.md b/vendor/erusev/parsedown/tests/data/table_inline_markdown.md new file mode 100644 index 0000000..c2fe108 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/table_inline_markdown.md @@ -0,0 +1,4 @@ +| _header_ 1 | header 2 | +| ------------ | ------------ | +| _cell_ 1.1 | ~~cell~~ 1.2 | +| `cell` 2.1 | cell 2.2 | \ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/text_reference.html b/vendor/erusev/parsedown/tests/data/text_reference.html new file mode 100644 index 0000000..11e4d37 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/text_reference.html @@ -0,0 +1,8 @@ +

reference link

+

one with a semantic name

+

[one][404] with no definition

+

multiline +one defined on 2 lines

+

one with a mixed case label and an upper case definition

+

one with the a label on the next line

+

link

\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/text_reference.md b/vendor/erusev/parsedown/tests/data/text_reference.md new file mode 100644 index 0000000..1a66a5c --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/text_reference.md @@ -0,0 +1,21 @@ +[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 a mixed case label and an upper case definition + +[LABEL]: http://example.com + +[one] +[1] with the a label on the next line + +[`link`][website] \ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/unordered_list.html b/vendor/erusev/parsedown/tests/data/unordered_list.html new file mode 100644 index 0000000..cd95567 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/unordered_list.html @@ -0,0 +1,10 @@ +
    +
  • li
  • +
  • li
  • +
+

mixed markers:

+
    +
  • li
  • +
  • li
  • +
  • li
  • +
\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/unordered_list.md b/vendor/erusev/parsedown/tests/data/unordered_list.md new file mode 100644 index 0000000..cf62c99 --- /dev/null +++ b/vendor/erusev/parsedown/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/erusev/parsedown/tests/data/untidy_table.html b/vendor/erusev/parsedown/tests/data/untidy_table.html new file mode 100644 index 0000000..88e1c2b --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/untidy_table.html @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + +
header 1header 2
cell 1.1cell 1.2
cell 2.1cell 2.2
\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/untidy_table.md b/vendor/erusev/parsedown/tests/data/untidy_table.md new file mode 100644 index 0000000..8524eb1 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/untidy_table.md @@ -0,0 +1,4 @@ +| header 1 | header 2 | +| ------------- | ----------- | +| cell 1.1 | cell 1.2 | +| cell 2.1 | cell 2.2 | \ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/url_autolinking.html b/vendor/erusev/parsedown/tests/data/url_autolinking.html new file mode 100644 index 0000000..58ca94c --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/url_autolinking.html @@ -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)

+

trailing slash http://example.com/ and http://example.com/path/

\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/url_autolinking.md b/vendor/erusev/parsedown/tests/data/url_autolinking.md new file mode 100644 index 0000000..840f354 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/url_autolinking.md @@ -0,0 +1,5 @@ +an autolink http://example.com + +inside of brackets [http://example.com], inside of braces {http://example.com}, inside of parentheses (http://example.com) + +trailing slash http://example.com/ and http://example.com/path/ \ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/whitespace.html b/vendor/erusev/parsedown/tests/data/whitespace.html new file mode 100644 index 0000000..f2dd7a0 --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/whitespace.html @@ -0,0 +1 @@ +
code
\ No newline at end of file diff --git a/vendor/erusev/parsedown/tests/data/whitespace.md b/vendor/erusev/parsedown/tests/data/whitespace.md new file mode 100644 index 0000000..4cf926a --- /dev/null +++ b/vendor/erusev/parsedown/tests/data/whitespace.md @@ -0,0 +1,5 @@ + + + code + + \ No newline at end of file