Module:Find sources/autodoc
Appearance
This module provides automatic documentation for templates based on Module:Find sources. See Module:Find sources#Automatic documentation for an overview.
local p = {}
function p.getPrefixPagenames(prefix)
local specialText = string.format('{{Special:PrefixIndex/%s}}', prefix)
specialText = mw.getCurrentFrame():preprocess(specialText)
specialText = mw.text.unstrip(specialText)
local pagenames = {}
for s in string.gmatch(specialText, '<a href="[^"]*" title="([^"]*)"[^>]*>[^<]*</a>') do
pagenames[#pagenames + 1] = mw.text.decode(s)
end
return pagenames
end
return p