Module:glossary/data

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("Appendix:Glossary"):getContent:gmatch("{{anchor|([^}]+)}}") do	for anchor in parameters:gmatch("[^|]+") do		anchors[format_anchor(anchor)] = true end end

return anchors