mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
fix mentions in code blocks
This commit is contained in:
@@ -188,6 +188,11 @@ describe PostAnalyzer do
|
||||
post_analyzer.raw_mentions.should == ['jake']
|
||||
end
|
||||
|
||||
it "ignores code in markdown-formatted code blocks" do
|
||||
post_analyzer = PostAnalyzer.new(" @Jake @Finn\n@Ryan", default_topic_id)
|
||||
post_analyzer.raw_mentions.should == ['ryan']
|
||||
end
|
||||
|
||||
it "ignores quotes" do
|
||||
post_analyzer = PostAnalyzer.new("[quote=\"Evil Trout\"]@Jake[/quote] @Finn", default_topic_id)
|
||||
post_analyzer.raw_mentions.should == ['finn']
|
||||
|
||||
Reference in New Issue
Block a user