Модуль:Loc/Marking: различия между версиями
Pok (обсуждение | вклад) мНет описания правки |
Pok (обсуждение | вклад) мНет описания правки |
||
| (не показаны 4 промежуточные версии этого же участника) | |||
| Строка 150: | Строка 150: | ||
if tip == "" and params._value and visible ~= params._value then tip = params._value end | if tip == "" and params._value and visible ~= params._value then tip = params._value end | ||
end | end | ||
return "{{altTooltip|1=" .. (visible or "") .. "|2={{#invoke:Loc|GetRawString|" .. (tip or "") .. "}}}}" | return "{{altTooltip|1=" .. (visible or "") .. "|2=<span style='white-space:pre-wrap;'>{{#invoke:Loc|GetRawString|noFormat=1|" .. (tip or "") .. "}}</span>}}" | ||
end) | end) | ||
while true do | while true do | ||
| Строка 194: | Строка 194: | ||
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 | local noFormat = args.noFormat | ||
text = mw.text.unstripNoWiki(text) | text = mw.text.unstripNoWiki(text) | ||
text = process_nowiki_equals(text) | text = process_nowiki_equals(text) | ||
local class = | local class = noFormat and "ts-loc-format" or "" | ||
local content = transform(text) | local content = transform(text) | ||
if mw.ustring.find(content, '^[ \t]*[#%*;%:]+') then | if mw.ustring.find(content, '^[ \t]*[#%*;%:]+') then | ||