From 897074c8694305c82f3dd96c4bd2bcf9039a3a45 Mon Sep 17 00:00:00 2001 From: Daniel Vincent Grippi Date: Sun, 12 Sep 2010 22:33:51 -0700 Subject: [PATCH] replace in comment websocket action replaces one or more number instead of just the first --- app/views/js/_websocket_js.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/js/_websocket_js.haml b/app/views/js/_websocket_js.haml index cadbdb17d..05f7dce40 100644 --- a/app/views/js/_websocket_js.haml +++ b/app/views/js/_websocket_js.haml @@ -46,8 +46,9 @@ $(html).fadeIn("fast", function(){}) ); toggler = $('.show_post_comments', post) + toggler.html( - toggler.html().replace(/\d/,$('.comment_set', post)[0].childElementCount -1)); + toggler.html().replace(/\d+/,$('.comment_set', post)[0].childElementCount -1)); if( !$(".comments", post).is(':visible') ){ toggler.click();