diff --git a/inc/functions.php b/inc/functions.php index 96f11f2a..3840e03b 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -864,6 +864,13 @@ $body = utf8tohtml($body, true); + if($config['wiki_markup']) { + $body = preg_replace("/(^|\n)==(.+?)==\n?/m", "

$2

", $body); + $body = preg_replace("/'''(.+?)'''/m", "$1", $body); + $body = preg_replace("/''(.+?)''/m", "$1", $body); + $body = preg_replace("/\*\*(.+?)\*\*/m", "$1", $body); + } + if($config['markup_urls']) { $body = preg_replace($config['url_regex'], "$0", $body, -1, $num_links); if($num_links > $config['max_links']) @@ -925,12 +932,6 @@ $body = preg_replace("/(^|\n)([\s]+)?(>)([^\n]+)?($|\n)/m", '$1$2$3$4$5', $body); - if($config['wiki_markup']) { - $body = preg_replace("/(^|\n)==(.+?)==\n?/m", "

$2

", $body); - $body = preg_replace("/'''(.+?)'''/m", "$1", $body); - $body = preg_replace("/''(.+?)''/m", "$1", $body); - $body = preg_replace("/\*\*(.+?)\*\*/m", "$1", $body); - } if($config['strip_superfluous_returns']) $body = preg_replace('/\s+$/', '', $body);