using composer for markdown
This commit is contained in:
parent
ec37ff4e75
commit
145915346c
4 changed files with 6 additions and 1740 deletions
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"require": {
|
||||
"twig/twig": "1.12.*"
|
||||
"twig/twig": "1.12.*",
|
||||
"michelf/php-markdown": "1.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
||||
?>
|
1732
lib/markdown.php
1732
lib/markdown.php
File diff suppressed because it is too large
Load diff
|
@ -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 {
|
|||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue