From 73de5d39ea104d8a8f05838f1e417eab6d62a04f Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Thu, 31 Mar 2022 19:23:47 -0500 Subject: [PATCH] Add root node constructor Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com> --- src/Kelpie.jl | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Kelpie.jl b/src/Kelpie.jl index fc8882a..582d2fc 100644 --- a/src/Kelpie.jl +++ b/src/Kelpie.jl @@ -2,6 +2,8 @@ module Kelpie import EzXML: link!, EzXML + +export html export html_element """ @@ -75,4 +77,15 @@ function html_element(name::AbstractString, content=nothing; kwargs...) return el end #function +""" + html(content) + +Creates a new HTML document filled with `content`. +""" +function html(content) + doc = EzXML.HTMLDocumentNode(nothing, nothing) + link_or_text!(doc, content) + return doc +end #function + end #module