fix leading spaces
This commit is contained in:
parent
1cf1f67ac7
commit
8ad91faceb
1 changed files with 5 additions and 1 deletions
|
|
@ -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: ""
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue