From a7e936c8c3ba65fcf6f3f977a0175e0a705e65d5 Mon Sep 17 00:00:00 2001 From: shahrul Date: Sun, 20 Oct 2024 20:38:38 +0800 Subject: [PATCH] added sanitize, added node list render as table --- .rockspec | 6 +-- README.md | 11 ++-- examples/web-component/app/test.luax | 75 ++++++++++++---------------- examples/web-component/server.lua | 9 +--- h.lua | 22 +++++++- test/17_table.luax | 8 +-- test/18_filter.luax | 15 ++---- test/test_spec.lua | 12 ++--- 8 files changed, 74 insertions(+), 84 deletions(-) diff --git a/.rockspec b/.rockspec index 1f37cf2..4283dfa 100644 --- a/.rockspec +++ b/.rockspec @@ -1,9 +1,9 @@ package = "luax" -version = "1.0.8-1" +version = "1.1.0-1" source = { - url = "https://github.com/syarul/luax/archive/refs/tags/v1.0.8.tar.gz", - dir = "luax-1.0.8" + url = "https://github.com/syarul/luax/archive/refs/tags/v1.1.0.tar.gz", + dir = "luax-1.1.0" } description = { summary = "HTML parse in Lua", diff --git a/README.md b/README.md index 63aa317..4e2045a 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ LuaX is Lua + XML Syntax extension with built-in decent parse. In retrospect it's akin to React JSX. -Luarocks Package +Luarocks Package [![Lua CI](https://github.com/syarul/luax/actions/workflows/lua.yml/badge.svg)](https://github.com/syarul/luax/actions/workflows/lua.yml) ## Decent Parser @@ -67,9 +67,8 @@ local filters = { { url = "#/completed", name = "Completed", selected = false }, } -local content = table.concat(map(filters, function(filter) - -- convert to string - return h(
  • +local content = map(filters, function(filter) + return
  • {filter.name} -
  • ) -end), '\n') + +end) return