diff options
author | Hayleigh Thompson <me@hayleigh.dev> | 2023-07-19 22:04:07 +0100 |
---|---|---|
committer | Hayleigh Thompson <me@hayleigh.dev> | 2023-07-19 22:04:07 +0100 |
commit | 59d7782b65eaf6b2bab6bbcfa9ec97cf9f6d3c73 (patch) | |
tree | 30f4fb9850cc64799ba58a464f7c7ace58c57349 | |
parent | be928f231f8fbf716593cde1a80387b8539d4635 (diff) | |
download | lustre-59d7782b65eaf6b2bab6bbcfa9ec97cf9f6d3c73.tar.gz lustre-59d7782b65eaf6b2bab6bbcfa9ec97cf9f6d3c73.zip |
:lipstick: Format debug output nicely.
-rw-r--r-- | test/examples/input.gleam | 11 | ||||
-rw-r--r-- | test/examples/input.html | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/test/examples/input.gleam b/test/examples/input.gleam index 352e480..da93d47 100644 --- a/test/examples/input.gleam +++ b/test/examples/input.gleam @@ -64,7 +64,16 @@ fn render(model: Model) -> Element(Msg) { email_input(model.email), password_input(model.password), remember_checkbox(model.remember_me), - pre([attribute.class("debug")], [t(string.inspect(model))]), + pre( + [attribute.class("debug")], + [ + string.inspect(model) + |> string.replace("(", "(\n ") + |> string.replace(", ", ",\n ") + |> string.replace(")", "\n)") + |> t, + ], + ), ]), ], ) diff --git a/test/examples/input.html b/test/examples/input.html index 273dffa..3bd6463 100644 --- a/test/examples/input.html +++ b/test/examples/input.html @@ -21,7 +21,7 @@ } .debug { - @apply text-sm text-gray-400 whitespace-pre-line; + @apply text-sm text-gray-400; } .input label { |