diff --git a/src/Kelpie.jl b/src/Kelpie.jl index b898d1e..3104778 100644 --- a/src/Kelpie.jl +++ b/src/Kelpie.jl @@ -1,5 +1,44 @@ module Kelpie -# Write your package code here. +import EzXML: link!, EzXML -end +""" + link_or_text!(node, content) + +Converts `content` to an `EzXML.TextNode` if it isn't already an `EzXML.Node` and links it +to `node`. Will link all nodes in `content` if content is a vector. + +```jldoctest +julia> import EzXML: ElementNode, prettyprint; import Kelpie: link_or_text! + +julia> prettyprint(link_or_text!(ElementNode("div"), ElementNode("br"))) +