Module:Namespace detect/data: Difference between revisions

bug fix - use the demospace parameter as both key and value in the argKeys table
m>Mr. Stradivarius
(use "demopage" instead of "page" as the default page parameter - needed to fix bug on en.wikisource where "Page" is a namespace name)
m>Mr. Stradivarius
(bug fix - use the demospace parameter as both key and value in the argKeys table)
Line 18: Line 18:
-- values can be added as a string, or as an array of strings.
-- values can be added as a string, or as an array of strings.


local argKeys = {
local defaultKeys = {
main = {'main'},
'main',
talk = {'talk'},
'talk',
other = {'other'},
'other',
subjectns = {'subjectns'},
'subjectns',
demospace = {'demospace'},
'demospace',
page = {'demopage'}
'demopage'
}
}
local argKeys = {}
for i, defaultKey in ipairs(defaultKeys) do
argKeys[defaultKey] = {defaultKey}
end


for defaultKey, t in pairs(argKeys) do
for defaultKey, t in pairs(argKeys) do
Anonymous user