From f475b417953588f7f21d2e569aebe4fbf14515ac Mon Sep 17 00:00:00 2001 From: tovedetered Date: Fri, 5 Apr 2024 08:05:07 -0400 Subject: [PATCH] added documentation --- src/xmleam/xml_builder.gleam | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/xmleam/xml_builder.gleam b/src/xmleam/xml_builder.gleam index e0ac162..f677eb6 100644 --- a/src/xmleam/xml_builder.gleam +++ b/src/xmleam/xml_builder.gleam @@ -103,6 +103,9 @@ pub fn tag(document: XmlBuilder, label: String, contents: String) -> XmlBuilder } } +/// this is a basic tag that automatically adds the CDATA tag to the XML +/// NOTE: This same effect can be created with any other tag by adding +/// to the content blocks, this is just for convienence pub fn cdata_tag(document: XmlBuilder, label: String, contents: String) { let label_empty = string.is_empty(label) use <- bool.guard(when: label_empty, return: Error(LabelEmpty))