Merge branch 'deps/remove-earmark' into 'master'
Remove unneeded Markdown converter (earmark) Closes #172 See merge request framasoft/mobilizon!201
This commit is contained in:
commit
8ea569bebb
@ -115,17 +115,6 @@ defmodule MobilizonWeb.API.Utils do
|
||||
|> Formatter.linkify(options)
|
||||
end
|
||||
|
||||
# @doc """
|
||||
# Formatting text to markdown.
|
||||
# """
|
||||
# def format_input(text, "text/markdown", options) do
|
||||
# text
|
||||
# |> Formatter.mentions_escape(options)
|
||||
# |> Earmark.as_html!()
|
||||
# |> Formatter.linkify(options)
|
||||
# |> Formatter.html_escape("text/html")
|
||||
# end
|
||||
|
||||
def make_report_content_text(nil), do: {:ok, nil}
|
||||
|
||||
def make_report_content_text(comment) do
|
||||
|
@ -101,12 +101,10 @@ defmodule Mobilizon.Service.Export.Feed do
|
||||
defp get_entry(%Event{} = event) do
|
||||
description = event.description || ""
|
||||
|
||||
case Earmark.as_html(description) do
|
||||
{:ok, html, []} ->
|
||||
entry =
|
||||
Entry.new(event.url, event.publish_at || event.inserted_at, event.title)
|
||||
|> Entry.link(event.url, rel: "alternate", type: "text/html")
|
||||
|> Entry.content({:cdata, html}, type: "html")
|
||||
|> Entry.content({:cdata, description}, type: "html")
|
||||
|> Entry.published(event.publish_at || event.inserted_at)
|
||||
|
||||
# Add tags
|
||||
@ -116,10 +114,6 @@ defmodule Mobilizon.Service.Export.Feed do
|
||||
|> Enum.reduce(entry, fn tag, acc -> Entry.category(acc, tag.slug, label: tag.title) end)
|
||||
|
||||
Entry.build(entry)
|
||||
|
||||
{:error, _html, error_messages} ->
|
||||
Logger.error("Unable to produce HTML for Markdown", details: inspect(error_messages))
|
||||
end
|
||||
end
|
||||
|
||||
@spec fetch_events_from_token(String.t()) :: String.t()
|
||||
|
Loading…
Reference in New Issue
Block a user