From 7a25fad4b03b7fdf1f28858408a9726b81393142 Mon Sep 17 00:00:00 2001 From: Shish Date: Sun, 5 Feb 2012 07:37:20 +0000 Subject: [PATCH] link to specific comments --- ext/bbcode/main.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/bbcode/main.php b/ext/bbcode/main.php index 239f06c2..420b5033 100644 --- a/ext/bbcode/main.php +++ b/ext/bbcode/main.php @@ -38,7 +38,8 @@ class BBCode extends FormatterExtension { $text = preg_replace("/\[i\](.*?)\[\/i\]/s", "\\1", $text); $text = preg_replace("/\[u\](.*?)\[\/u\]/s", "\\1", $text); $text = preg_replace("/\[s\](.*?)\[\/s\]/s", "\\1", $text); - $text = preg_replace("/>>(\d+)/s", ">>\\1", $text); + $text = preg_replace("/>>(\d+)(#\d+)?/s", ">>\\1\\2", $text); + $text = preg_replace("/(^|\s)#(\d+)/s", "\\1#\\2", $text); $text = preg_replace("/>>([^\d].+)/", "
\\1
", $text); $text = preg_replace("/\[url=((?:https?|ftp|irc|mailto):\/\/.*?)\](.*?)\[\/url\]/s", "\\2", $text); $text = preg_replace("/\[url\]((?:https?|ftp|irc|mailto):\/\/.*?)\[\/url\]/s", "\\1", $text);