1
0
Fork 0
mirror of https://github.com/MillironX/Kelpie.jl.git synced 2024-11-14 21:43:10 +00:00

Merge pull request #5 from MillironX:div-fix

Fix for `html_div` function
This commit is contained in:
Thomas A. Christensen II 2022-04-06 19:11:52 +00:00 committed by GitHub
commit 2640b728fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 1 deletions

View file

@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [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 ## [0.2.0] - 2022-04-05
### Added ### Added

View file

@ -161,7 +161,7 @@ for symbol in HTML_ELEMENTS
end end
function html_div(content...=nothing; kwargs...) function html_div(content...=nothing; kwargs...)
return html_element("div", content; kwargs...) return html_element("div", content...; kwargs...)
end #function end #function
end #module end #module

View file

@ -239,5 +239,15 @@ end #function
@testset "Behaviors" begin @testset "Behaviors" begin
# Test that attributes with underscores become attributes with dashes # Test that attributes with underscores become attributes with dashes
@test occursin("<i data-tooltip=\"foo\"/>", prettystring(i(; data_tooltip="foo"))) @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
end #testset end #testset