模組:Glossary/data

維基詞典,自由的多語言詞典

Automatically retrieves and stores the names of anchors formatted with {{anchor}} in Appendix:Glossary. Module:glossary uses this to make sure that a term that is placed in {{glossary}} actually has an entry in the glossary.


local anchors = {}

for anchor in mw.title.new("Appendix:Glossary"):getContent():gmatch("{{anchor|([^}]+)}}") do
	anchors[anchor] = true
end

return anchors