Skip to content

Commit

Permalink
fix browser regex support
Browse files Browse the repository at this point in the history
  • Loading branch information
octavioamu committed Feb 18, 2020
1 parent e489da3 commit 8141622
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/assets/v2/js/activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
$(document).ready(function() {

var linkify = function(new_text) {
new_text = new_text.replace(/(?<!\S)#(\w*)/g, ' <a href="/?tab=search-$1">#$1</a>');
new_text = new_text.replace(/(?:^|\s)#([a-zA-Z\d-]+)/g, ' <a href="/?tab=search-$1">#$1</a>');
new_text = new_text.replace(/\B@(\w*)/g, ' <a href="/profile/$1">@$1</a>');
return new_text;
};
Expand Down

0 comments on commit 8141622

Please sign in to comment.