Modul:glossary/data
Napohlad
- This module lacks a documentation subpage. Please create it.
- Useful links: root page • root page’s subpages • links • transclusions • testcases • sandbox
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("Přidawk:Glosar"):getContent():gmatch("{{anchor|([^}]+)}}") do
for anchor in parameters:gmatch("[^|]+") do
anchors[format_anchor(anchor)] = true
end
end
return anchors