Модуль: Infobox: различия между версиями 🔗
Материал из VEDA Wiki
Sphynkx (обсуждение | вклад) Нет описания правки |
Sphynkx (обсуждение | вклад) Нет описания правки |
||
Строка 2: | Строка 2: | ||
function p.synonyms( frame ) | function p.synonyms( frame ) | ||
local t = {} | |||
local t={} | local name = frame.args[1] | ||
local name = frame.args[1] | |||
for i in string.gmatch(name, "[^;]+") do | for i in string.gmatch(name, "[^;]+") do | ||
table.insert(t, "[[" .. i .. "]]") | |||
end | end | ||
table.insert(t, ")") | |||
local out = table.concat(t,";") | table.insert(t, ")") | ||
out = "<br>(" .. out | local out = table.concat(t,";") | ||
return "Synonyms test" .. name .. "ENDE" .. out | out = "<br>(" .. out | ||
return "Synonyms test" .. name .. "ENDE" .. out | |||
end | end | ||
return p | return p |
Версия от 22:31, 27 сентября 2024
Для документации этого модуля может быть создана страница Модуль:Infobox/doc
local p = {} -- p stands for package
function p.synonyms( frame )
local t = {}
local name = frame.args[1]
for i in string.gmatch(name, "[^;]+") do
table.insert(t, "[[" .. i .. "]]")
end
table.insert(t, ")")
local out = table.concat(t,";")
out = "<br>(" .. out
return "Synonyms test" .. name .. "ENDE" .. out
end
return p