fix: Add missing file
This commit is contained in:
parent
f5c0ed776e
commit
aa761d4112
1 changed files with 9 additions and 0 deletions
9
lib/bdfr_browser/render_utils.ex
Normal file
9
lib/bdfr_browser/render_utils.ex
Normal file
|
@ -0,0 +1,9 @@
|
|||
defmodule BdfrBrowser.RenderUtils do
|
||||
def message(msg) do
|
||||
img_replacement = "<img src=\"/chat_media/\\1\" style=\"max-width: 500px;\" alt=\"Image\" />"
|
||||
|
||||
msg
|
||||
|> String.replace(~r/https:\/\/i\.redd\.it\/(.+)/, img_replacement)
|
||||
|> Earmark.as_html!()
|
||||
end
|
||||
end
|
Reference in a new issue