yoohoo! hot sauce please

10:27, 7 September 2026 (UTC)

Module:Articlebox

From 2swagg wiki
Revision as of 08:09, 11 October 2026 by Bulgogi2 (talk | contribs) (Created page with "local p = {} local cat = "%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^%]]*%]%]" function p.main(frame) local text = frame:expandTemplate({ title = ":" .. (frame.args[1] or "Grass"), args = {}, }) text = text:gsub("\n%s*" .. cat, "") text = text:gsub(cat, "") return text end return p")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Fixes a bug in {{Articlebox}} (formerly Northbox) that caused category links to bleed to the transclusion page.


local p = {}
local cat = "%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^%]]*%]%]"

function p.main(frame)
	local text = frame:expandTemplate({
		title = ":" .. (frame.args[1] or "Grass"),
		args = {},
	})
	text = text:gsub("\n%s*" .. cat, "")
	text = text:gsub(cat, "")
	return text
end

return p