Модуль:Loc/Marking: различия между версиями

мНет описания правки
мНет описания правки
Строка 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={{#invoke:Loc|GetRawString|noFormat=1|" .. (tip or "") .. "}}}}"
     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 format = args[2]
     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 = format and "ts-loc-format" or ""
     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