]> git.mxchange.org Git - friendica.git/blobdiff - vendor/michelf/php-markdown/Readme.php
Composer: php-markdown updated to 1.8.0
[friendica.git] / vendor / michelf / php-markdown / Readme.php
index 89449dea4dc1743a0ca0914aa7959120dfbcd3ef..e473d7336430c6539438f9e9751d303d89671fdc 100644 (file)
@@ -4,13 +4,15 @@
 // through the Markdown filter. You can adapt this sample code in any way
 // you like.
 
-// Install PSR-0-compatible class autoloader
+// Install PSR-4-compatible class autoloader
 spl_autoload_register(function($class){
-       require preg_replace('{\\\\|_(?!.*\\\\)}', DIRECTORY_SEPARATOR, ltrim($class, '\\')).'.php';
+       require str_replace('\\', DIRECTORY_SEPARATOR, ltrim($class, '\\')).'.php';
 });
+// If using Composer, use this instead:
+//require 'vendor/autoloader.php';
 
 // Get Markdown class
-use \Michelf\Markdown;
+use Michelf\Markdown;
 
 // Read file and pass content through the Markdown parser
 $text = file_get_contents('Readme.md');