Модуль:Сущность: различия между версиями
Pok (обсуждение | вклад) мНет описания правки |
Pok (обсуждение | вклад) мНет описания правки |
||
| Строка 37: | Строка 37: | ||
local function makeSourceLink(s) | local function makeSourceLink(s) | ||
local className = s.name .. (s.kind | local className = s.name | ||
.. (s.kind and (s.kind:sub(1, 1):upper() .. s.kind:sub(2)) or "") | |||
local tplLabel = "Template:" .. s.tplPath | local tplLabel = "Template:" .. s.tplPath | ||
return "[[" .. tplLabel .. "|" .. className .. "]]" | return "[[" .. tplLabel .. "|" .. className .. "]]" | ||
| Строка 206: | Строка 207: | ||
function p.preview(frame) | function p.preview(frame) | ||
local args = getArgs(frame, { removeBlanks = false }) | local args = getArgs(frame, { removeBlanks = false }) | ||
local tplPath = args[1] | local tplPath = args[1] or "" | ||
if tplPath == "" then return "" end | if tplPath == "" then return "" end | ||