diff options
author | sanine <sanine.not@pm.me> | 2023-08-18 15:48:54 -0500 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2023-08-18 15:48:54 -0500 |
commit | c8f36f3df88c1a4064a9c73c95a165eb13beeb20 (patch) | |
tree | e18d7cfd9cac65f2f5b34fb710f8532a4c441805 /marigold.lua | |
parent | 83448304527d8a1dde233f2f33b98124bced5f88 (diff) |
add demomain
Diffstat (limited to 'marigold.lua')
-rw-r--r-- | marigold.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/marigold.lua b/marigold.lua index 9daa808..a5b1c75 100644 --- a/marigold.lua +++ b/marigold.lua @@ -104,6 +104,7 @@ local function render_internal(tbl, indent_level) children, indent, close) end +marigold.prerender = render_internal marigold.render = function(tbl) local str = render_internal(tbl, 0) @@ -171,7 +172,13 @@ marigold.rect = function(tbl) end -marigold.text = function(tbl) +marigold.text = function(content, tbl) + local tag, err = maketag( + 'text', content, tbl, + { 'lengthAdjust', 'x', 'y', 'dx', 'dy', 'rotate', 'textLength' } + ) + if err then error(err) end + return tag end |