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:29, 10 August 2019 (let's just address ", since it is the only problem so far). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
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[mw.ustring.gsub(template, '"', '"')]
end

return p