mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: mentions broken after adding an <abbr> tag
A previous shortcut used was not allowing for <abbr and other tags starting with a If <abbr> appeared anywhere in the text all mentions would fail to link
This commit is contained in:
@@ -204,6 +204,10 @@ describe PrettyText do
|
||||
|
||||
describe "Mentions" do
|
||||
|
||||
it "can handle mentions after abbr" do
|
||||
expect(PrettyText.cook("test <abbr>test</abbr>\n\n@bob")).to eq("<p>test <abbr>test</abbr></p>\n<p><span class=\"mention\">@bob</span></p>")
|
||||
end
|
||||
|
||||
it "should handle 3 mentions in a row" do
|
||||
expect(PrettyText.cook('@hello @hello @hello')).to match_html "<p><span class=\"mention\">@hello</span> <span class=\"mention\">@hello</span> <span class=\"mention\">@hello</span></p>"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user