Пређи на садржај

Модул:glossary/data

Script error: The function "main" does not exist.

local ugsub = mw.ustring.gsub

local anchors = {}

function format_anchor (anchor)
	return (ugsub(anchor, "[%s_]+", "_")) -- (multiple) spaces to underscores
end

for parameters in mw.title.new("Додатак:Речник"):getContent():gmatch("{{anchor|([^}]+)}}") do
	for anchor in parameters:gmatch("[^|]+") do
		anchors[format_anchor(anchor)] = true
	end
end

return anchors