fix leading spaces

This commit is contained in:
zack 2024-10-27 16:23:50 -04:00
parent 1cf1f67ac7
commit 8ad91faceb
No known key found for this signature in database
GPG key ID: 5F873416BCF59F35

View file

@ -124,8 +124,12 @@ defmodule ZoeyscomputerWeb.GistLive.OgImage do
|> String.replace(~r/^(\s+).*$/, "\\1")
|> String.length()
if String.length(line) == leading_spaces do
div(0, 2)
else
div(leading_spaces, 2)
end
end
defp render_line("", _y_position, _indent), do: ""