33c95186fb
Code is gross
22 lines
471 B
Elixir
22 lines
471 B
Elixir
defmodule Temple.Support.Utils do
|
|
defmacro __using__(_) do
|
|
quote do
|
|
import Kernel, except: [==: 2, =~: 2]
|
|
import unquote(__MODULE__)
|
|
end
|
|
end
|
|
|
|
def a == b when is_binary(a) and is_binary(b) do
|
|
a = String.replace(a, "\n", "")
|
|
b = String.replace(b, "\n", "")
|
|
|
|
Kernel.==(a, b)
|
|
end
|
|
|
|
def a =~ b when is_binary(a) and is_binary(b) do
|
|
a = String.replace(a, "\n", "")
|
|
b = String.replace(b, "\n", "")
|
|
|
|
Kernel.=~(a, b)
|
|
end
|
|
end
|