Soft launch: Soldier biographies and research notes vary in completeness. Prefer class-roster, NARA, newspapers, and other cited sources for contested facts — treat Research notes as leads, not settled history. Anyone can correct a page; contact us with questions.

Module:SplitCats

From Ritchie Boys Wiki
Revision as of 02:00, 18 August 2026 by Admin (talk | contribs) (Import Lua helper)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Documentation for this module may be created at Module:SplitCats/doc

local p = {}

function p.categories(frame)
	local raw = frame.args[1] or ''
	local prefix = frame.args[2] or 'Class '
	local out = {}
	for part in mw.text.gsplit(raw, ';', true) do
		part = mw.text.trim(part)
		if part ~= '' then
			table.insert(out, '[[Category:' .. prefix .. part .. ']]')
		end
	end
	return table.concat(out)
end

return p