Модуль:Loc/Marking: различия между версиями
Pok (обсуждение | вклад) мНет описания правки |
Pok (обсуждение | вклад) мНет описания правки |
||
| Строка 16: | Строка 16: | ||
elseif t == "head" then | elseif t == "head" then | ||
local level = params and tonumber(params._value) or 1 | local level = params and tonumber(params._value) or 1 | ||
return '<h' .. level .. '>' .. inner .. '</h' .. level .. '>' | |||
return '< | |||
elseif t == "font" then | elseif t == "font" then | ||
local family = params and params._value or nil | local family = params and params._value or nil | ||
| Строка 192: | Строка 189: | ||
local args = frame.args or {} | local args = frame.args or {} | ||
local text = args[1] or args.text or "" | local text = args[1] or args.text or "" | ||
local format = args[2] | |||
text = mw.text.unstripNoWiki(text) | text = mw.text.unstripNoWiki(text) | ||
text = process_nowiki_equals(text) | text = process_nowiki_equals(text) | ||
return frame:preprocess('<div class="list-reset-margin">\n' .. transform(text) .. '</div>') | local class = format and "ts-loc-format" or "" | ||
return frame:preprocess( | |||
frame:extensionTag( | |||
'templatestyles', | |||
'', | |||
{ src = 'Модуль:Loc/styles.css' } | |||
) .. | |||
'<div class="list-reset-margin ' .. class .. '">\n' .. transform(text) .. '</div>' | |||
) | |||
end | end | ||
return p | return p | ||