Модуль:GCImageList: различия между версиями
Внешний вид
Admin (обсуждение | вклад) Новая страница: «-- Превращает "file1.png;file2.png" в SIZESIZE local p = {} function p.render(frame) local args = frame:getParent() and frame:getParent().args or frame.args local files = args.files or '' local size = args.size or 'x200px' local out = {} for file in mw.text.gsplit(files, '%s*;%s*') do file = mw.text.trim(file) if file ~= '' then table.insert(out, strin...» |
(нет различий)
|
Текущая версия от 08:23, 10 августа 2025
Для документации этого модуля может быть создана страница Модуль:GCImageList/doc
-- Превращает "file1.png;file2.png" в [[Файл:file1.png|SIZE]][[Файл:file2.png|SIZE]]
local p = {}
function p.render(frame)
local args = frame:getParent() and frame:getParent().args or frame.args
local files = args.files or ''
local size = args.size or 'x200px'
local out = {}
for file in mw.text.gsplit(files, '%s*;%s*') do
file = mw.text.trim(file)
if file ~= '' then
table.insert(out, string.format('[[Файл:%s|%s]]', file, size))
end
end
return table.concat(out, '\n')
end
return p