Модуль:Карточка: различия между версиями

мНет описания правки
Нет описания правки
Строка 194: Строка 194:
if args.title then
if args.title then
local node = h.printTitleWrapper(out)
local node = h.printTitleWrapper(out)
node:wikitext("{{ucfirst:" .. args.title .. "}}")
node:wikitext(h.capitalizeFirst(args.title, args))
end
end
end
end
Строка 707: Строка 707:
-- try not to totally fail here
-- try not to totally fail here
return h.htmlEntities[h.entityType or 'div'][key]
return h.htmlEntities[h.entityType or 'div'][key]
end
function h.capitalizeTitle(text, args)
if h.castBool(args.capitalize_title or 'yes') then
return "{{ucfirst:" .. text .. "}}"
end
return text
end
end


return p
return p