diff --git a/ext/bbcode/main.php b/ext/bbcode/main.php
index 3100e5be..e6176358 100644
--- a/ext/bbcode/main.php
+++ b/ext/bbcode/main.php
@@ -38,7 +38,7 @@ 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+)(#c?(\d+))?/s", ">>\\1\\2", $text);
+ $text = preg_replace("/>>(\d+)(#c?(\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); diff --git a/lib/shimmie.js b/lib/shimmie.js index 9d6077cb..bb2aa2b3 100644 --- a/lib/shimmie.js +++ b/lib/shimmie.js @@ -51,6 +51,14 @@ $(document).ready(function() { a = document.getElementById("nextlink"); a.href = a.href + '?' + query; } + + $(".comment_link").each(function(idx, elm) { + var target_id = $(elm).text().match(/#c\d+/); + if(target_id && $(target_id)) { + var target_name = $(target_id+" .username").html(); + $(elm).html("@"+target_name); + } + }); });