Moduł:Drzewa link: Różnice pomiędzy wersjami
Z Nonsensopedii, polskiej encyklopedii humoru
M |
M (powiedzny) |
||
Linia 15: | Linia 15: | ||
local cat |
local cat |
||
local namespace |
local namespace |
||
⚫ | |||
for o in range(0, 1) do |
|||
else |
|||
⚫ | |||
for arg in expectedArgs do |
|||
else cat = v end |
|||
if |
if args[arg] ~= nil then cat = args[arg] end |
||
end |
|||
end |
end |
||
return namespace .. ', ' .. cat |
return namespace .. ', ' .. cat |
Wersja z 09:23, 2 gru 2020
local p = {}
local tools = require('Moduł:Narzędzia')
function p.linkCat(frame)
local expectedArgs = {
['główna']='główna',
['pliki']='pliki',
['nonnews']='nonnews',
['słownik']='cytaty',
['cytaty']='cytaty',
['poradniki']='poradniki',
['nonźródła']='nonźródła'
}
local args = frame.args
local cat
local namespace
if expectedArgs[args[1]] == nil then namespace = expectedArgs[args[1]]
else
for arg in expectedArgs do
if args[arg] ~= nil then cat = args[arg] end
end
end
return namespace .. ', ' .. cat
end
return p