Your macro:
defmacro inline_svg(file_name) do
path = static_path(file_name)
case File.read(path) do
{:ok, file} -> quote do: {:safe, unquote(file)}
{:error, _} -> raise "No SVG found at #{path}"
end
end
Your macro:
defmacro inline_svg(file_name) do
path = static_path(file_name)
case File.read(path) do
{:ok, file} -> quote do: {:safe, unquote(file)}
{:error, _} -> raise "No SVG found at #{path}"
end
end