模組:沙盒/-Zest/test
外观
local p = {}
function p.count(frame)
local category = frame.args[1]
if not category then return "ERROR" end
local wt = string.format(
'<categorytree mode="pages" namespaces = "Main " >%s</categorytree>',
category
)
--???
-- for x in htmlstr:gmatch('<li>.-<a [^>]-href="[^"]+"[^>]->(.-)</a>') do
-- x = mw.text.decodeHTML(linktext):match("^%s*(.-)%s*$")
--
--
-- end
-- end
-- return maincount
--test
local html = frame:preprocess('<categorytree mode="pages" namespaces="Main">法国省份</categorytree>')
return mw.text.nowiki(tostring(html))
end
return p