only allow two consecutive newlines

git-svn-id: file:///home/shish/svn/shimmie2/branches/branch_2.2@1117 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish 2008-11-27 07:19:12 +00:00
parent d26fba7faf
commit 9edcd9de70

View File

@ -20,6 +20,7 @@ class BBCode extends Extension {
$text = preg_replace("/\[url\]((?:https?|ftp|irc|mailto):\/\/.*?)\[\/url\]/s", "<a href='\\1'>\\1</a>", $text);
$text = preg_replace("/\[\[([^\|\]]+)\|([^\]]+)\]\]/s", "<a href='".make_link("wiki/\\1")."'>\\2</a>", $text);
$text = preg_replace("/\[\[([^\]]+)\]\]/s", "<a href='".make_link("wiki/\\1")."'>\\1</a>", $text);
$text = preg_replace("/\n\s*\n/", "\n\n", $text);
$text = str_replace("\n", "\n<br>", $text);
$text = preg_replace("/\[quote\](.*?)\[\/quote\]/s", "<blockquote><small>\\1</small></blockquote>", $text);
$text = preg_replace("/\[quote=(.*?)\](.*?)\[\/quote\]/s", "<small><small>Quoting \\1</small></small><blockquote><small>\\2</small></blockquote>", $text);