From 503c368f9ec08a70e4dbacd7b729568da6e4ea92 Mon Sep 17 00:00:00 2001 From: Klaus Weidenbach Date: Sat, 25 Feb 2017 19:12:41 +0100 Subject: :arrow_up: :hammer: Upgrade PHP Markdown library. The current version throws deprecated warning with PHP7.1 and PHPUnit. Upgrade the Markdown library to the current PHP Markdown Lib 1.7.0. Used composer to manage this library. --- include/help.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'include/help.php') diff --git a/include/help.php b/include/help.php index 6e779f000..e4725575d 100644 --- a/include/help.php +++ b/include/help.php @@ -1,5 +1,7 @@ 1) { $path = ''; for($x = 1; $x < argc(); $x ++) { @@ -55,7 +57,7 @@ function get_help_content($tocpath = false) { if(! $text) { $doctype = 'bbcode'; $text = load_doc_file('doc/main.bb'); - goaway('/help/about/about_hubzilla'); + goaway('/help/about/about_hubzilla'); \App::$page['title'] = t('Help'); } @@ -69,12 +71,11 @@ function get_help_content($tocpath = false) { } if($doctype === 'html') - $content = parseIdentityAwareHTML($text); - if($doctype === 'markdown') { - require_once('library/markdown.php'); + $content = parseIdentityAwareHTML($text); + if($doctype === 'markdown') { # escape #include tags $text = preg_replace('/#include/ism', '%%include', $text); - $content = Markdown($text); + $content = MarkdownExtra::defaultTransform($text); $content = preg_replace('/%%include/ism', '#include', $content); } if($doctype === 'bbcode') { @@ -99,8 +100,7 @@ function preg_callback_help_include($matches) { $include = str_replace(' target="_blank"','',$include); } elseif(preg_match('/\.md$/', $matches[1])) { - require_once('library/markdown.php'); - $include = Markdown($include); + $include = MarkdownExtra::defaultTransform($include); } return $include; } -- cgit v1.2.3