Модуль:Entity Lookup: различия между версиями
Pok (обсуждение | вклад) Нет описания правки |
Pok (обсуждение | вклад) Нет описания правки |
||
| Строка 14: | Строка 14: | ||
local name = entity.name or "" | local name = entity.name or "" | ||
local label = mw.ustring.lower(entity.label or "") | local label = mw.ustring.lower(entity.label or "") | ||
local suffix = | local suffix = "" | ||
if useSuffix | if useSuffix then | ||
suffix = mw.ustring.lower(entity.suffix or "") | |||
if suffix ~= "" then | |||
local parts = {} | |||
for part in tostring(suffix):gmatch("[^,;]+") do | |||
part = mw.text.trim(part) | |||
if part ~= "" then | |||
parts[#parts + 1] = part | |||
end | |||
end | end | ||
suffix = table.concat(parts, ", ") | |||
end | end | ||
end | end | ||