Модуль:Песочница/Pok: различия между версиями
Pok (обсуждение | вклад) Нет описания правки |
Pok (обсуждение | вклад) Нет описания правки |
||
| (не показана 1 промежуточная версия этого же участника) | |||
| Строка 12: | Строка 12: | ||
if not s then return s end | if not s then return s end | ||
return (s:gsub("^%s*(.-)%s*$", "%1")) | return (s:gsub("^%s*(.-)%s*$", "%1")) | ||
end | |||
local function ucfirst(s) | |||
if not s or s == "" then return s end | |||
return mw.ustring.upper(mw.ustring.sub(s, 1, 1)) .. mw.ustring.sub(s, 2) | |||
end | end | ||
| Строка 45: | Строка 50: | ||
end | end | ||
return content | return content | ||
end | end | ||
| Строка 926: | Строка 926: | ||
local function processEntity(kind, name, isStore) | local function processEntity(kind, name, isStore) | ||
local pathName = | local pathName = ucfirst(name) | ||
local tplPath = kind .. "/" .. pathName | local tplPath = kind .. "/" .. pathName | ||
if isStore then | if isStore then | ||