Модуль:Песочница/Pok: различия между версиями

Нет описания правки
мНет описания правки
Строка 47: Строка 47:


local function load_template_content(path)
local function load_template_content(path)
local title = mw.title.new("Template:" .. path)
local title = mw.title.new("Шаблон:" .. path)
if not title then return nil end
if not title then return nil end
local ok, content = pcall(function() return title:getContent() end)
local ok, content = pcall(function() return title:getContent() end)
Строка 88: Строка 88:


for compName,_ in pairs(foundComponents) do
for compName,_ in pairs(foundComponents) do
local tplPath = "component/" .. compName
local tplPath = "Component/" .. compName
local content = load_template_content(tplPath)
local content = load_template_content(tplPath)
if not content then
if not content then