Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

better mentions regex

  • Loading branch information...
commit 7b77131da81c28eb8e657cbead4f4f0dd2d58b6f 1 parent 78754f1
@jchris jchris authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  views/mentions/map.js
  2. +1 −1  views/tags/map.js
View
2  views/mentions/map.js
@@ -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
2  views/tags/map.js
@@ -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) {
Please sign in to comment.
Something went wrong with that request. Please try again.