mirror of
https://github.com/friendica/friendica
synced 2025-04-27 03:10:12 +00:00
Tests with new markdown library
This commit is contained in:
parent
70615d7f78
commit
b710c8bbfd
12 changed files with 3694 additions and 7 deletions
17
library/php-markdown/markdown.php
Normal file
17
library/php-markdown/markdown.php
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
//# Install PSR-0-compatible class autoloader
|
||||
//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;
|
||||
|
||||
function Markdown($text) {
|
||||
# Read file and pass content through the Markdown parser
|
||||
$html = MarkdownExtra::defaultTransform($text);
|
||||
|
||||
return $html;
|
||||
}
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue