Jump to content

Module:Transclusion count/sandbox

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Ahecht (talk | contribs) at 02:12, 10 August 2019 (create draft). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
local p = {}

function p.main()
	local template = mw.title.getCurrentTitle().text
	local index = mw.ustring.sub(template,1,1)
	local data = mw.loadData('Module:Transclusion_count/data/' .. (mw.ustring.find(index, "%a") and index or "other"))
	return data[template]
end

return p