Skip to content

Commit

Permalink
Resolve single quote string warnings (#152)
Browse files Browse the repository at this point in the history
This resolves the following errors during tests:

    warning: single-quoted strings represent charlists. Use ~c"" if you
    indeed want a charlist or use "" instead
  • Loading branch information
kianmeng authored Jul 2, 2024
1 parent 28fe84d commit c19c017
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/acceptance/ast/html/permissive_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ defmodule Acceptance.Ast.Html.PermissiveTest do
# Needs a fix with issue [#326](https://github.com/pragdave/earmark/issues/326)
test "mixture of tags (was regtest #103)" do
markdown = "<x>a\n<y></y>\n<y>\n<z>\n</z>\n<z>\n</x>"
ast = [{"x", '', ["a", "<y></y>", "<y>", "<z>", "</z>", "<z>"], @verbatim}]
ast = [{"x", ~c"", ["a", "<y></y>", "<y>", "<z>", "</z>", "<z>"], @verbatim}]
messages = Enum.zip([1, 3, 6], ~w[x y z])
|> Enum.map(fn {lnb, tag} -> {:warning, lnb, "Failed to find closing <#{tag}>"} end)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ defmodule MyStruct do

test "or activated" do
ast =
[{"p", '', ["see ", {"a", [{"href", "https://my.site.com"}], ["https://my.site.com"], %{}}], %{}}]
[{"p", ~c"", ["see ", {"a", [{"href", "https://my.site.com"}], ["https://my.site.com"], %{}}], %{}}]

assert as_ast(@markdown, %MyStruct{pure_links: true}) == {:ok, ast, []}
end
Expand Down

0 comments on commit c19c017

Please sign in to comment.