fix test for converting bio \r\n to <br>.
This commit is contained in:
parent
cdb3dd48ab
commit
1495d04789
|
@ -64,7 +64,6 @@ def to_for_user_and_mentions(_user, mentions, inReplyTo, "direct") do
|
||||||
|
|
||||||
def make_content_html(status, mentions, attachments, tags, no_attachment_links \\ false) do
|
def make_content_html(status, mentions, attachments, tags, no_attachment_links \\ false) do
|
||||||
status
|
status
|
||||||
|> String.replace("\r", "")
|
|
||||||
|> format_input(mentions, tags)
|
|> format_input(mentions, tags)
|
||||||
|> maybe_add_attachments(attachments, no_attachment_links)
|
|> maybe_add_attachments(attachments, no_attachment_links)
|
||||||
end
|
end
|
||||||
|
@ -95,7 +94,7 @@ def add_attachments(text, attachments) do
|
||||||
def format_input(text, mentions, tags) do
|
def format_input(text, mentions, tags) do
|
||||||
text
|
text
|
||||||
|> Formatter.html_escape()
|
|> Formatter.html_escape()
|
||||||
|> String.replace("\n", "<br>")
|
|> String.replace(~r/\r?\n/, "<br>")
|
||||||
|> (&{[], &1}).()
|
|> (&{[], &1}).()
|
||||||
|> Formatter.add_links()
|
|> Formatter.add_links()
|
||||||
|> Formatter.add_user_links(mentions)
|
|> Formatter.add_user_links(mentions)
|
||||||
|
|
Loading…
Reference in a new issue