Upgrade to Parsedown-extra

This commit is contained in:
theshka 2015-04-29 07:07:59 -07:00 committed by theshka
parent 0363f1e3a1
commit 968dc183db
2 changed files with 3 additions and 3 deletions

View File

@ -14,7 +14,7 @@
"require": { "require": {
"php": ">=5.2.4", "php": ">=5.2.4",
"twig/twig": "1.18.*", "twig/twig": "1.18.*",
"michelf/php-markdown": "1.3" "erusev/parsedown-extra": "dev-master@dev"
}, },
"autoload": { "autoload": {
"files": ["lib/pico.php"] "files": ["lib/pico.php"]

View File

@ -129,7 +129,7 @@ class Pico {
} }
/** /**
* Parses the content using Markdown * Parses the content using Parsedown-extra
* *
* @param string $content the raw txt content * @param string $content the raw txt content
* @return string $content the Markdown formatted content * @return string $content the Markdown formatted content
@ -138,7 +138,7 @@ class Pico {
{ {
$content = preg_replace('#/\*.+?\*/#s', '', $content, 1); // Remove first comment (with meta) $content = preg_replace('#/\*.+?\*/#s', '', $content, 1); // Remove first comment (with meta)
$content = str_replace('%base_url%', $this->base_url(), $content); $content = str_replace('%base_url%', $this->base_url(), $content);
$content = MarkdownExtra::defaultTransform($content); $content = (new ParsedownExtra())->text($content);
return $content; return $content;
} }