From a4299fe4a659fe0e22f8e11e90096f1f66c3345c Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Fri, 26 Nov 2010 01:41:35 -0800 Subject: Wiki markup addition and ability to disable/enable it --- inc/functions.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'inc/functions.php') diff --git a/inc/functions.php b/inc/functions.php index 0c1210e5..4e03a531 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -209,10 +209,13 @@ if(MARKUP_URLS) $body = preg_replace(URL_REGEX, "$0", $body); - $body = preg_replace("/(^|\n)([\s]+)?(>)([^\n]+)?($|\n)/m", '$1$2$3$4$5', $body); - $body = preg_replace("/(^|\n)==(.+?)==\n?/m", "

$2

", $body); - $body = preg_replace("/'''(.+?)'''/m", "$1", $body); + + if(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("/\n/", '
', $body); } -- cgit v1.3