Skip to content

Commit

Permalink
Merge pull request #19 from mzagaja/user_reply_tagging
Browse files Browse the repository at this point in the history
Mark @ replies as bold in answers.
  • Loading branch information
jsdiaz committed Dec 18, 2015
2 parents d0a5a4e + 9a9845f commit ee98090
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion client/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ body {

* {
text-indent:0px!important;
font-weight:normal!important;
}

a {
Expand Down
1 change: 1 addition & 0 deletions client/views/list/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ Template.list.helpers({
if(a > 2) {
questions[i].answer[a].isHidden = true;
}
questions[i].answer[a].text = questions[i].answer[a].text.replace(/\B(@\S+)/g, "<strong>$1</strong>");
var urlRegex = /(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/g;
questions[i].answer[a].text = questions[i].answer[a].text.replace(urlRegex, function(url) {
if(url.charAt(url.length-1) == ")") {
Expand Down

0 comments on commit ee98090

Please sign in to comment.