From 7e61cd41cca9a8915b346a79d658bab4829d8ff1 Mon Sep 17 00:00:00 2001 From: sanine Date: Sun, 22 May 2022 12:49:14 -0500 Subject: allow adding children via marigold.h --- marigold.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'marigold.lua') diff --git a/marigold.lua b/marigold.lua index c95ecb5..3ed0f59 100644 --- a/marigold.lua +++ b/marigold.lua @@ -63,6 +63,11 @@ marigold.h = function(tag_type, content, tbl) tag.content = content tag.attributes = {} tag.children = {} + if tbl then + for _, child in ipairs(tbl) do + table.insert(tag.children, child) + end + end return tag end -- cgit v1.2.1