Модуль:Карточка: различия между версиями
CatBG (обсуждение | вклад) мНет описания правки |
CatBG (обсуждение | вклад) Нет описания правки |
||
| Строка 194: | Строка 194: | ||
if args.title then | if args.title then | ||
local node = h.printTitleWrapper(out) | local node = h.printTitleWrapper(out) | ||
node:wikitext( | 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 | ||