Skip to content

Commit

Permalink
💄 Format debug output nicely.
Browse files Browse the repository at this point in the history
  • Loading branch information
hayleigh-dot-dev committed Jul 19, 2023
1 parent be928f2 commit 59d7782
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion test/examples/input.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -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,
],
),
]),
],
)
Expand Down
2 changes: 1 addition & 1 deletion test/examples/input.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}

.debug {
@apply text-sm text-gray-400 whitespace-pre-line;
@apply text-sm text-gray-400;
}

.input label {
Expand Down

0 comments on commit 59d7782

Please sign in to comment.