using composer for markdown

This commit is contained in:
Konrad Riedel 2013-07-10 15:12:44 +02:00
parent ec37ff4e75
commit 145915346c
4 changed files with 6 additions and 1740 deletions

View file

@ -1,5 +1,6 @@
{
"require": {
"twig/twig": "1.12.*"
"twig/twig": "1.12.*",
"michelf/php-markdown": "1.3"
}
}
}

View file

@ -9,8 +9,5 @@ define('THEMES_DIR', ROOT_DIR .'themes/');
define('CACHE_DIR', LIB_DIR .'cache/');
require(ROOT_DIR .'vendor/autoload.php');
require(LIB_DIR .'markdown.php');
require(LIB_DIR .'pico.php');
$pico = new Pico();
?>

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,5 @@
<?php
use \Michelf\MarkdownExtra;
/**
* Pico
*
@ -132,7 +132,7 @@ class Pico {
{
$content = preg_replace('#/\*.+?\*/#s', '', $content); // Remove comments and meta
$content = str_replace('%base_url%', $this->base_url(), $content);
$content = Markdown($content);
$content = MarkdownExtra::defaultTransform($content);
return $content;
}
@ -336,4 +336,4 @@ class Pico {
}
?>
?>