Merge pull request #5 from MillironX:div-fix

Fix for `html_div` function
master
Thomas A. Christensen II 2 years ago committed by GitHub
commit 2640b728fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

@ -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

@ -239,5 +239,15 @@ end #function
@testset "Behaviors" begin
# Test that attributes with underscores become attributes with dashes
@test occursin("<i data-tooltip=\"foo\"/>", prettystring(i(; data_tooltip="foo")))
# Test that edge case functions can slurp their arguments
@test occursin(
"""
<div>
<p>foo</p>
<p>bar</p>
</div>""",
prettystring(html_div(p("foo"), p("bar"))),
)
end #testset
end #testset

Loading…
Cancel
Save