Модуль:Сущность: различия между версиями
Pok (обсуждение | вклад) мНет описания правки |
Pok (обсуждение | вклад) мНет описания правки |
||
| Строка 1: | Строка 1: | ||
local p = {} | local p = {} | ||
local getArgs = require('Module:Arguments').getArgs | |||
local function trim(s) | local function trim(s) | ||
| Строка 115: | Строка 116: | ||
function p.get(frame) | function p.get(frame) | ||
local args = frame | local args = getArgs(frame, { removeBlanks = false }) | ||
local id = args[1] or "" | local id = args[1] or "" | ||
if id == "" then return "" end | if id == "" then return "" end | ||
| Строка 204: | Строка 205: | ||
function p.preview(frame) | function p.preview(frame) | ||
local args = frame | local args = getArgs(frame, { removeBlanks = false }) | ||
local tplPath = args[1] or args.tpl or args.template or "" | local tplPath = args[1] or args.tpl or args.template or "" | ||
if tplPath == "" then return "" end | if tplPath == "" then return "" end | ||