clean up
This commit is contained in:
parent
d82f373bd2
commit
eba003b3b5
1 changed files with 2 additions and 2 deletions
|
@ -1,12 +1,12 @@
|
|||
defmodule ChiyaWeb.Exim do
|
||||
alias Chiya.Notes.Note
|
||||
|
||||
defp frontmatter(%Note{name: title, channels: channels}) do
|
||||
defp create_frontmatter(%Note{name: title, channels: channels}) do
|
||||
channels_raw = Enum.map_join(channels, "], [", fn c -> "\"#{c.name}\"" end)
|
||||
"title: \"#{title}\"\ncategories: [#{channels_raw}]"
|
||||
end
|
||||
|
||||
def export_note(%Note{content: content} = note) do
|
||||
"---\n#{frontmatter(note)}\n---\n#{content}"
|
||||
"---\n#{create_frontmatter(note)}\n---\n#{content}"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue