Bump markdown-it-diaspora-mention
This commit is contained in:
parent
6e7910b037
commit
a341be7677
3 changed files with 22 additions and 3 deletions
2
Gemfile
2
Gemfile
|
|
@ -96,7 +96,7 @@ source "https://rails-assets.org" do
|
|||
|
||||
gem "rails-assets-markdown-it", "8.0.0"
|
||||
gem "rails-assets-markdown-it-hashtag", "0.4.0"
|
||||
gem "rails-assets-markdown-it-diaspora-mention", "1.0.0"
|
||||
gem "rails-assets-markdown-it-diaspora-mention", "1.1.0"
|
||||
gem "rails-assets-markdown-it-sanitizer", "0.4.3"
|
||||
gem "rails-assets-markdown-it--markdown-it-for-inline", "0.1.1"
|
||||
gem "rails-assets-markdown-it-sub", "1.0.0"
|
||||
|
|
|
|||
|
|
@ -666,7 +666,7 @@ GEM
|
|||
rails-assets-jquery (>= 1.6)
|
||||
rails-assets-markdown-it--markdown-it-for-inline (0.1.1)
|
||||
rails-assets-markdown-it (8.0.0)
|
||||
rails-assets-markdown-it-diaspora-mention (1.0.0)
|
||||
rails-assets-markdown-it-diaspora-mention (1.1.0)
|
||||
rails-assets-markdown-it-hashtag (0.4.0)
|
||||
rails-assets-markdown-it-sanitizer (0.4.3)
|
||||
rails-assets-markdown-it-sub (1.0.0)
|
||||
|
|
@ -1002,7 +1002,7 @@ DEPENDENCIES
|
|||
rails-assets-jquery-textchange (= 0.2.3)!
|
||||
rails-assets-markdown-it (= 8.0.0)!
|
||||
rails-assets-markdown-it--markdown-it-for-inline (= 0.1.1)!
|
||||
rails-assets-markdown-it-diaspora-mention (= 1.0.0)!
|
||||
rails-assets-markdown-it-diaspora-mention (= 1.1.0)!
|
||||
rails-assets-markdown-it-hashtag (= 0.4.0)!
|
||||
rails-assets-markdown-it-sanitizer (= 0.4.3)!
|
||||
rails-assets-markdown-it-sub (= 1.0.0)!
|
||||
|
|
|
|||
|
|
@ -86,6 +86,25 @@ describe("app.helpers.textFormatter", function(){
|
|||
expect(wrapper.find("a[href='/people/" + this.alice.guid + "']")).not.toHaveClass('hovercardable');
|
||||
expect(wrapper.find("a[href='/people/" + this.bob.guid + "']")).toHaveClass('hovercardable');
|
||||
});
|
||||
|
||||
it("supports mentions without a given name", function() {
|
||||
this.statusMessage.set({text: "hey there @{alice@example.com} and @{bob@example.com}"});
|
||||
var formattedText = this.formatter(this.statusMessage.get("text"), this.statusMessage.get("mentioned_people"));
|
||||
var wrapper = $("<div>").html(formattedText);
|
||||
|
||||
_.each([this.alice, this.bob], function(person) {
|
||||
expect(wrapper.find("a[href='/people/" + person.guid + "']").text()).toContain(person.name);
|
||||
});
|
||||
});
|
||||
|
||||
it("it uses the name given in the mention if it exists", function() {
|
||||
this.statusMessage.set({text: "hey there @{Alice Awesome; alice@example.com} and @{bob@example.com}"});
|
||||
var formattedText = this.formatter(this.statusMessage.get("text"), this.statusMessage.get("mentioned_people"));
|
||||
var wrapper = $("<div>").html(formattedText);
|
||||
|
||||
expect(wrapper.find("a[href='/people/" + this.alice.guid + "']").text()).toContain("Alice Awesome");
|
||||
expect(wrapper.find("a[href='/people/" + this.bob.guid + "']").text()).toContain(this.bob.name);
|
||||
});
|
||||
});
|
||||
|
||||
context("highlight", function(){
|
||||
|
|
|
|||
Loading…
Reference in a new issue