forked from leftypol/leftypol
Wiki markup addition and ability to disable/enable it
This commit is contained in:
parent
5fd0d21d56
commit
a4299fe4a6
2 changed files with 8 additions and 3 deletions
|
@ -209,10 +209,13 @@
|
|||
|
||||
if(MARKUP_URLS)
|
||||
$body = preg_replace(URL_REGEX, "<a href=\"$0\">$0</a>", $body);
|
||||
|
||||
$body = preg_replace("/(^|\n)([\s]+)?(>)([^\n]+)?($|\n)/m", '$1$2<span class="quote">$3$4</span>$5', $body);
|
||||
$body = preg_replace("/(^|\n)==(.+?)==\n?/m", "<h2>$2</h2>", $body);
|
||||
$body = preg_replace("/'''(.+?)'''/m", "<strong>$1</strong>", $body);
|
||||
|
||||
if(WIKI_MARKUP) {
|
||||
$body = preg_replace("/(^|\n)==(.+?)==\n?/m", "<h2>$2</h2>", $body);
|
||||
$body = preg_replace("/'''(.+?)'''/m", "<strong>$1</strong>", $body);
|
||||
$body = preg_replace("/''(.+?)''/m", "<em>$1</em>", $body);
|
||||
}
|
||||
$body = preg_replace("/\n/", '<br/>', $body);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue