Cleanup + Standards for library/markdown.php
This commit is contained in:
parent
839a457ab2
commit
86ed5caab7
1 changed files with 1 additions and 10 deletions
|
@ -1,20 +1,12 @@
|
||||||
<?php
|
<?php
|
||||||
//# Install PSR-0-compatible class autoloader
|
require_once "library/php-markdown/Michelf/MarkdownExtra.inc.php";
|
||||||
//spl_autoload_register(function($class){
|
|
||||||
// require preg_replace('{\\\\|_(?!.*\\\\)}', DIRECTORY_SEPARATOR, ltrim($class, '\\')).'.php';
|
|
||||||
//});
|
|
||||||
|
|
||||||
require_once("library/php-markdown/Michelf/MarkdownExtra.inc.php");
|
|
||||||
# Get Markdown class
|
|
||||||
use \Michelf\MarkdownExtra;
|
use \Michelf\MarkdownExtra;
|
||||||
|
|
||||||
function Markdown($text) {
|
function Markdown($text) {
|
||||||
|
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
|
|
||||||
$stamp1 = microtime(true);
|
$stamp1 = microtime(true);
|
||||||
|
|
||||||
# Read file and pass content through the Markdown parser
|
|
||||||
$MarkdownParser = new MarkdownExtra();
|
$MarkdownParser = new MarkdownExtra();
|
||||||
$MarkdownParser->hard_wrap = true;
|
$MarkdownParser->hard_wrap = true;
|
||||||
$html = $MarkdownParser->transform($text);
|
$html = $MarkdownParser->transform($text);
|
||||||
|
@ -23,4 +15,3 @@ function Markdown($text) {
|
||||||
|
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|
Loading…
Reference in a new issue