Модуль:GetField: различия между версиями
Pok (обсуждение | вклад) Нет описания правки |
Pok (обсуждение | вклад) Нет описания правки |
||
| Строка 1317: | Строка 1317: | ||
local bullet = mw.text.unstripNoWiki(args.prefix or "* ") | local bullet = mw.text.unstripNoWiki(args.prefix or "* ") | ||
local sep = mw.text.unstripNoWiki(args.sep or ": ") | local sep | ||
if outputType == "revertList" then | |||
sep = mw.text.unstripNoWiki(args.sep or "") | |||
else | |||
sep = mw.text.unstripNoWiki(args.sep or ": ") | |||
end | |||
if outputType == "none" then | if outputType == "none" then | ||
bullet = "" | bullet = "" | ||
| Строка 1411: | Строка 1418: | ||
if outputType == "enum" then | if outputType == "enum" then | ||
line = vStr .. " " .. keyStr | line = vStr .. " " .. keyStr | ||
elseif outputType == "revertList" then | |||
line = bullet .. vStr .. sep .. keyStr | |||
else | else | ||
line = bullet .. keyStr .. sep .. vStr | line = bullet .. keyStr .. sep .. vStr | ||
| Строка 1426: | Строка 1435: | ||
if outputType == "enum" then | if outputType == "enum" then | ||
return frame:preprocess(table.concat(out, ", ")) | return frame:preprocess(table.concat(out, ", ")) | ||
elseif outputType == "list" then | elseif outputType == "list" or outputType == "revertList" then | ||
return frame:preprocess(table.concat(out, "\n")) | return frame:preprocess(table.concat(out, "\n")) | ||
else | else | ||