Merge pull request #4472 from svbergerem/fix-mentions-in-preview

Fix preview with more than one mention
This commit is contained in:
Jonne Haß 2013-08-29 11:42:58 -07:00
commit 770e436ee1
2 changed files with 2 additions and 1 deletions

View file

@ -8,6 +8,7 @@
* Make invite code input width consistent across borwsers [#4448](https://github.com/diaspora/diaspora/pull/4448)
* Fix style of contacts in profile sidebar [#4451](https://github.com/diaspora/pull/4451)
* Fix profile mobile when logged out [#4464](https://github.com/diaspora/pull/4464)
* Fix preview with more than one mention [#4450](https://github.com/diaspora/diaspora/issues/4450)
## Features
* Add oEmbed content to the mobile view [#4343](https://github.com/diaspora/diaspora/pull/4353)

View file

@ -160,7 +160,7 @@ app.views.Publisher = Backbone.View.extend(_.extend(
});
var mentioned_people = new Array();
var regexp = new RegExp("@{\(\.\*\) ; \(\.\*\)}", "g");
var regexp = new RegExp("@{\(\[\^\;\]\+\); \(\[\^\}\]\+\)}", "g");
while(user=regexp.exec(serializedForm["status_message[text]"])){
// user[1]: name, user[2]: handle
var mentioned_user = Mentions.contacts.filter(function(item) { return item.handle == user[2];})[0];