your mom's instrument

This commit is contained in:
Luna D 2021-09-14 01:08:47 +02:00
parent 670242bc13
commit 8f6f56b0e7
No known key found for this signature in database
GPG key ID: 81AF416F2CC36FC8

View file

@ -1,11 +1,11 @@
defmodule PhilomenaWeb.TextileMarkdownRenderer do defmodule PhilomenaWeb.TextileMarkdownRenderer do
alias Philomena.Textile.ParserMarkdown alias Philomena.Textile.ParserMarkdown
def render_one(post, conn) do def render_one(post) do
hd(render_collection([post], conn)) hd(render_collection([post]))
end end
def render_collection(posts, conn) do def render_collection(posts) do
opts = %{image_transform: &Camo.Image.image_url/1} opts = %{image_transform: &Camo.Image.image_url/1}
parsed = Enum.map(posts, &ParserMarkdown.parse(opts, &1.body)) parsed = Enum.map(posts, &ParserMarkdown.parse(opts, &1.body))