Модуль:Предмет: различия между версиями
Pok (обсуждение | вклад) Нет описания правки |
Pok (обсуждение | вклад) Нет описания правки |
||
| Строка 13: | Строка 13: | ||
local function wrapLink(text, target) | local function wrapLink(text, target) | ||
return (text ~= '' and target and string.format('[[%s|%s]]', target, text) or text) | return (text ~= '' and target and string.format('[[%s|%s]]', target, text) or text) | ||
end | end | ||
| Строка 38: | Строка 31: | ||
local isVert = argsRaw.vertical ~= nil | local isVert = argsRaw.vertical ~= nil | ||
local | local projPrefix = JsonPaths.prefix() | ||
local | local projPrefixFile = JsonPaths.prefixFile() | ||
-- Получение имени | -- Получение имени | ||
| Строка 61: | Строка 53: | ||
-- Изображение | -- Изображение | ||
local imgFile = argsRaw.image or argsRaw.img or (id .. '.png') | local imgFile = argsRaw.image or argsRaw.img or (id .. '.png') | ||
if imgFile ~= '' and | if imgFile ~= '' and projPrefixFile ~= '' then | ||
imgFile = | imgFile = projPrefixFile .. imgFile | ||
end | end | ||