Do not truncate DM when it contains newlines and safe_dm_mentions is set to true
This commit is contained in:
parent
be6b57193a
commit
9134848170
2 changed files with 10 additions and 1 deletions
|
|
@ -206,6 +206,15 @@ defmodule Pleroma.FormatterTest do
|
|||
assert mentions == []
|
||||
assert expected_text == text
|
||||
end
|
||||
|
||||
test "given the 'safe_mention' option, it will keep text after newlines" do
|
||||
user = insert(:user)
|
||||
text = " @#{user.nickname}\n hey dude\n\nhow are you doing?"
|
||||
|
||||
{expected_text, _, _} = Formatter.linkify(text, safe_mention: true)
|
||||
|
||||
assert expected_text =~ "how are you doing?"
|
||||
end
|
||||
end
|
||||
|
||||
describe ".parse_tags" do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue