More actions
Content deleted Content added
// via Wikitext Extension for VSCode |
(No difference)
|
Revision as of 19:05, 12 August 2025
Documentation for this module may be created at Module:TagParser/doc
local U = {}
local function trim(s) return (mw.text.trim(s or '')) end
-- Split "undead;; animal;; monstrous;;" into { 'undead', 'animal', 'monstrous' }
function U.parseList(s)
if not s or s == '' then return {} end
local out = {}
for _, piece in ipairs(mw.text.split(s, ';;', true)) do
local v = mw.ustring.lower(trim(piece))
if v ~= '' then table.insert(out, v) end
end
return out
end
return U