From 8f1ddfc94035bad830f3165b9d80a1547842ea29 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Wed, 6 Apr 2022 09:01:51 -0500 Subject: [PATCH 1/3] Fix html_div not splatting its passed arguments Fixes: 58244fcb5dc1 ("Convert array checking to argument splatting") Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com> --- src/Kelpie.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Kelpie.jl b/src/Kelpie.jl index 79aa891..b8bbb2a 100644 --- a/src/Kelpie.jl +++ b/src/Kelpie.jl @@ -161,7 +161,7 @@ for symbol in HTML_ELEMENTS end function html_div(content...=nothing; kwargs...) - return html_element("div", content; kwargs...) + return html_element("div", content...; kwargs...) end #function end #module From 9d24c8dc57c2e226297b0a42fc7c076f08f9fe63 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Wed, 6 Apr 2022 09:02:32 -0500 Subject: [PATCH 2/3] Add test for div element Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com> --- test/runtests.jl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/runtests.jl b/test/runtests.jl index 70d614d..fa1b019 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -239,5 +239,15 @@ end #function @testset "Behaviors" begin # Test that attributes with underscores become attributes with dashes @test occursin("", prettystring(i(; data_tooltip="foo"))) + + # Test that edge case functions can slurp their arguments + @test occursin( + """ +
+

foo

+

bar

+
""", + prettystring(html_div(p("foo"), p("bar"))), + ) end #testset end #testset From aac2c4bda9d71e24b6289161292477b6eae1e874 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Wed, 6 Apr 2022 09:09:02 -0500 Subject: [PATCH 3/3] Update CHANGELOG Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com> --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88239ba..1b263d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- `html_div` syntax is now consistent with other functions ([#5](https://github.com/MillironX/Kelpie.jl/pull/5)) + ## [0.2.0] - 2022-04-05 ### Added