mirror of
https://github.com/MillironX/Kelpie.jl.git
synced 2024-11-14 21:43:10 +00:00
Add check for nothingness to link_or_text!
Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com>
This commit is contained in:
parent
6c8268f50c
commit
6152004356
1 changed files with 6 additions and 4 deletions
|
@ -83,10 +83,12 @@ julia> prettyprint(link_or_text!(ElementNode("div"), "The end", ElementNode("hr"
|
||||||
"""
|
"""
|
||||||
function link_or_text!(node, content...)
|
function link_or_text!(node, content...)
|
||||||
for con in content
|
for con in content
|
||||||
if typeof(con) <: EzXML.Node
|
if !isnothing(con)
|
||||||
link!(node, con)
|
if typeof(con) <: EzXML.Node
|
||||||
else
|
link!(node, con)
|
||||||
link!(node, EzXML.TextNode(string(con)))
|
else
|
||||||
|
link!(node, EzXML.TextNode(string(con)))
|
||||||
|
end #if
|
||||||
end #if
|
end #if
|
||||||
end #for
|
end #for
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue