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:
commit
2640b728fc
3 changed files with 15 additions and 1 deletions
|
@ -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…
Reference in a new issue