From 408645cccc03201c2a1504e9e1211a0fc0469447 Mon Sep 17 00:00:00 2001 From: Steffen van Bergerem Date: Mon, 30 Jan 2017 12:14:25 +0100 Subject: [PATCH] Use new mention syntax in the publisher --- app/assets/javascripts/app/views/publisher/mention_view.js | 2 +- spec/javascripts/app/views/publisher_mention_view_spec.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/app/views/publisher/mention_view.js b/app/assets/javascripts/app/views/publisher/mention_view.js index 86b3b07aa..f732c0247 100644 --- a/app/assets/javascripts/app/views/publisher/mention_view.js +++ b/app/assets/javascripts/app/views/publisher/mention_view.js @@ -6,7 +6,7 @@ app.views.PublisherMention = app.views.SearchBase.extend({ mentionRegex: /@([^@\s]+)$/, templates: { - mentionItemSyntax: _.template("@{<%= name %> ; <%= handle %>}"), + mentionItemSyntax: _.template("@{<%= handle %>}"), mentionItemHighlight: _.template("<%= name %>") }, diff --git a/spec/javascripts/app/views/publisher_mention_view_spec.js b/spec/javascripts/app/views/publisher_mention_view_spec.js index d4e9417e3..c95a3247a 100644 --- a/spec/javascripts/app/views/publisher_mention_view_spec.js +++ b/spec/javascripts/app/views/publisher_mention_view_spec.js @@ -189,7 +189,7 @@ describe("app.views.PublisherMention", function() { it("sets the correct messageText", function() { this.view.updateMessageTexts(); - expect(this.view.inputBox.data("messageText")).toBe("@user1 Text before @{user1 ; user1@pod.tld}\ntext after"); + expect(this.view.inputBox.data("messageText")).toBe("@user1 Text before @{user1@pod.tld}\ntext after"); }); it("formats overlay text to HTML", function() { @@ -468,7 +468,7 @@ describe("app.views.PublisherMention", function() { this.view.typeaheadInput.typeahead("val", "user"); this.view.typeaheadInput.typeahead("open"); this.view.$(".tt-suggestion").first().click(); - expect(this.view.getTextForSubmit()).toBe("@{user1 ; user1@pod.tld}"); + expect(this.view.getTextForSubmit()).toBe("@{user1@pod.tld}"); }); it("returns normal text if nobody has been mentioned", function() {