mirror of
https://github.com/MillironX/Kelpie.jl.git
synced 2024-11-14 13:43:08 +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...)
|
||||
for con in content
|
||||
if typeof(con) <: EzXML.Node
|
||||
link!(node, con)
|
||||
else
|
||||
link!(node, EzXML.TextNode(string(con)))
|
||||
if !isnothing(con)
|
||||
if typeof(con) <: EzXML.Node
|
||||
link!(node, con)
|
||||
else
|
||||
link!(node, EzXML.TextNode(string(con)))
|
||||
end #if
|
||||
end #if
|
||||
end #for
|
||||
|
||||
|
|
Loading…
Reference in a new issue