chore: apply mix format to codebase
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -46,7 +46,8 @@ defmodule SimpleshopTheme.Media.Image do
|
||||
defp detect_svg(changeset) do
|
||||
content_type = get_change(changeset, :content_type)
|
||||
|
||||
if content_type == "image/svg+xml" or String.ends_with?(get_change(changeset, :filename) || "", ".svg") do
|
||||
if content_type == "image/svg+xml" or
|
||||
String.ends_with?(get_change(changeset, :filename) || "", ".svg") do
|
||||
changeset
|
||||
|> put_change(:is_svg, true)
|
||||
|> maybe_store_svg_content()
|
||||
|
||||
@@ -23,7 +23,8 @@ defmodule SimpleshopTheme.Media.SVGRecolorer do
|
||||
|
||||
"""
|
||||
@spec recolor(String.t(), String.t()) :: String.t()
|
||||
def recolor(svg_content, target_color) when is_binary(svg_content) and is_binary(target_color) do
|
||||
def recolor(svg_content, target_color)
|
||||
when is_binary(svg_content) and is_binary(target_color) do
|
||||
svg_content
|
||||
|> recolor_fill_attributes(target_color)
|
||||
|> recolor_stroke_attributes(target_color)
|
||||
|
||||
Reference in New Issue
Block a user