aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHayleigh Thompson <me@hayleigh.dev>2023-09-22 10:53:18 +0100
committerHayleigh Thompson <me@hayleigh.dev>2023-09-22 10:53:18 +0100
commitf2bd623c7ddd16a0b615447b831a3392f5dcfa3f (patch)
tree32af1baea3b908501dc694656c3edbf2f12caa82
parentf2aa84a60724203e41a89f0672e56718f1a6965b (diff)
downloadlustre-f2bd623c7ddd16a0b615447b831a3392f5dcfa3f.tar.gz
lustre-f2bd623c7ddd16a0b615447b831a3392f5dcfa3f.zip
:bug: Fixed a bug where string attributes were not emitted properly because of spacing issues.
-rw-r--r--src/lustre/element.gleam4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lustre/element.gleam b/src/lustre/element.gleam
index 735fcba..21191ff 100644
--- a/src/lustre/element.gleam
+++ b/src/lustre/element.gleam
@@ -142,7 +142,9 @@ fn attrs_to_string_builder(
attrs: List(Attribute(msg)),
) -> StringBuilder {
use html, attr <- list.fold(attrs, html)
- string_builder.append_builder(html, attribute.to_string_builder(attr))
+ html
+ |> string_builder.append(" ")
+ |> string_builder.append_builder(attribute.to_string_builder(attr))
}
fn children_to_string_builder(