Module:Transclusion count/sandbox

From blackwiki
< Module:Transclusion count
Revision as of 02:29, 10 August 2019 by blackwiki>Ahecht (let's just address ", since it is the only problem so far)
Jump to navigation Jump to search

Documentation for this module may be created at Module:Transclusion count/sandbox/doc

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, '"', '&quot;')]
end

return p