Switching to parsedown and composer edits

Cette révision appartient à :
Shadi Isber 2014-04-22 13:19:03 -07:00
Parent 3d89e13a02
révision 89141b5edb
3 fichiers modifiés avec 71 ajouts et 3 suppressions

Voir le fichier

@ -12,6 +12,7 @@
}
],
"require": {
"php": ">=5.3"
"php": ">=5.3",
"erusev/parsedown": "dev-master"
}
}

64
composer.lock générée Fichier normal
Voir le fichier

@ -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": [
]
}

Voir le fichier

@ -1,6 +1,6 @@
<?php
require_once(dirname( __FILE__)."/markdown_extended.php");
require_once(dirname( __FILE__)."/../vendor/erusev/parsedown/Parsedown.php");//markdown_extended.php");
$tree = array();
$base = dirname(dirname(__FILE__));
$options = get_options(isset($argv[2]) ? $argv[2] : '');
@ -152,7 +152,10 @@
$page['path'] = str_replace($docs_path . '/', "", $file);
$page['markdown'] = file_get_contents($file);
$page['modified'] = filemtime($file);
$page['content'] = MarkDownExtended($page['markdown']);
$Parsedown = new Parsedown();
$page['content'] = $Parsedown->text($page['markdown']);
$page['title'] = clean_url($file, 'Title');
}
$relative_base = ($mode === 'Static') ? relative_path("", $file) : "http://" . $base_path . '/';