Permalink
Browse files

better mentions regex

  • Loading branch information...
1 parent 78754f1 commit 7b77131da81c28eb8e657cbead4f4f0dd2d58b6f @jchris jchris committed Jun 18, 2010
Showing with 2 additions and 2 deletions.
  1. +1 −1 views/mentions/map.js
  2. +1 −1 views/tags/map.js
View
@@ -1,7 +1,7 @@
function(doc) {
if (doc.message && doc.created_at) {
var words = {};
- doc.message.replace(/\@([\S\-\.]*[\w]+[\S\-\.]*)/g, function(tag, word) {
+ doc.message.replace(/\@([\w\-]+)/g, function(tag, word) {
words[word.toLowerCase()] = true;
});
for (var w in words) {
View
@@ -1,7 +1,7 @@
function(doc) {
if (doc.message && doc.created_at) {
var words = {};
- doc.message.replace(/\#([\S\-\.]*[\w]+[\S\-\.]*)/g, function(tag, word) {
+ doc.message.replace(/\#([\w\-\.]*[\w]+[\w\-\.]*)/g, function(tag, word) {
words[word.toLowerCase()] = true;
});
for (var w in words) {

0 comments on commit 7b77131

Please sign in to comment.