Skip to content

Commit

Permalink
This works with EP 1.4.21 buuut regressions on lists
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertDober committed Mar 14, 2022
1 parent f7118ed commit 6b7f603
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/earmark/earmark_parser_proxy.ex
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ defmodule Earmark.EarmarkParserProxy do
"""
def as_ast(input, options)
def as_ast(input, options) when is_list(options) do
EarmarkParser.as_ast(input, Keyword.delete(options, :smartypants))
EarmarkParser.as_ast(input, options |> Keyword.delete(:smartypants) |> Keyword.delete(:messages))
end
def as_ast(input, options) when is_map(options) do
EarmarkParser.as_ast(input, Map.delete(options, :smartypants))
EarmarkParser.as_ast(input, options |> Map.delete(:smartypants) |> Map.delete(:messages))
end

end
Expand Down
2 changes: 1 addition & 1 deletion lib/earmark/internal.ex
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ defmodule Earmark.Internal do
end

def as_html(lines, options) do
{status, ast, messages} = Transform.postprocessed_ast(lines, options)
{status, ast, messages} = Transform.postprocessed_ast(lines, %{options| messages: MapSet.new([])})
{status, Transform.transform(ast, options), messages}
end

Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


@deps [
{:earmark_parser, "== 1.4.18" },
{:earmark_parser, "== 1.4.21" },
{:dialyxir, "~> 1.1", only: [:dev, :test], runtime: false},
{:benchfella, "~> 0.3.0", only: [:dev]},
{:earmark_ast_dsl, "~> 0.2.5", only: [:test]},
Expand Down
2 changes: 1 addition & 1 deletion mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"certifi": {:hex, :certifi, "2.8.0", "d4fb0a6bb20b7c9c3643e22507e42f356ac090a1dcea9ab99e27e0376d695eba", [:rebar3], [], "hexpm", "6ac7efc1c6f8600b08d625292d4bbf584e14847ce1b6b5c44d983d273e1097ea"},
"dialyxir": {:hex, :dialyxir, "1.1.0", "c5aab0d6e71e5522e77beff7ba9e08f8e02bad90dfbeffae60eaf0cb47e29488", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "07ea8e49c45f15264ebe6d5b93799d4dd56a44036cf42d0ad9c960bc266c0b9a"},
"earmark_ast_dsl": {:hex, :earmark_ast_dsl, "0.2.5", "e44146944eebe83b33e3597da27fb9b37af7287c55e8cc3bd014cfcd5e57c355", [:mix], [], "hexpm", "da14595fcc283fa8d3ada8adb0b934cab791917b82cc5149cc4c404545cdc2b1"},
"earmark_parser": {:hex, :earmark_parser, "1.4.18", "e1b2be73eb08a49fb032a0208bf647380682374a725dfb5b9e510def8397f6f2", [:mix], [], "hexpm", "114a0e85ec3cf9e04b811009e73c206394ffecfcc313e0b346de0d557774ee97"},
"earmark_parser": {:hex, :earmark_parser, "1.4.21", "7299db854f6d63730c15c8a781862889bb0fbf4432d7c306b3e63ce825d64baa", [:mix], [], "hexpm", "60664e1bdf7a02d8cbec2ac1d5b6fe0a68cf1d749ba955990d647346fac421e4"},
"erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"},
"excoveralls": {:hex, :excoveralls, "0.14.4", "295498f1ae47bdc6dce59af9a585c381e1aefc63298d48172efaaa90c3d251db", [:mix], [{:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "e3ab02f2df4c1c7a519728a6f0a747e71d7d6e846020aae338173619217931c1"},
"extractly": {:hex, :extractly, "0.5.3", "ca6afc3430e63cc9017d50eb03bdf1a3499c7e888037d2279b0ec0ea393af390", [:mix], [], "hexpm", "858f7a285ffb767937e75bb8866f03fecb3b7e5b42728a9677d2ebb6ea885503"},
Expand Down

0 comments on commit 6b7f603

Please sign in to comment.