(refs #871)Make link for @mention which contains dot

This commit is contained in:
Naoki Takezoe
2015-08-15 10:15:44 +09:00
parent 1e6e686692
commit ace551c33d

View File

@@ -26,7 +26,7 @@ trait LinkConverter { self: RequestCache =>
}
}
// convert @username to link
.replaceBy("(?<=(^|\\W))@([a-zA-Z0-9\\-_]+)(?=(\\W|$))".r){ m =>
.replaceBy("(?<=(^|\\W))@([a-zA-Z0-9\\-_\\.]+)(?=(\\W|$))".r){ m =>
getAccountByUserName(m.group(2)).map { _ =>
s"""<a href="${context.path}/${m.group(2)}">@${m.group(2)}</a>"""
}