Difference between revisions of "Module:Transclusion count/sandbox"
Jump to navigation
Jump to search
blackwiki>Ahecht (mw.text.encode) |
blackwiki>Ahecht (let's just address ", since it is the only problem so far) |
||
| Line 5: | Line 5: | ||
local index = mw.ustring.sub(template,1,1) | 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")) | local data = mw.loadData('Module:Transclusion_count/data/' .. (mw.ustring.find(index, "%a") and index or "other")) | ||
| − | return data[mw. | + | return data[mw.ustring.gsub(template, '"', '"')] |
end | end | ||
return p | return p | ||
Revision as of 02:29, 10 August 2019
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, '"', '"')]
end
return p