Content deleted Content added
icon now works with _default; fixed an issue where when icon_format ~= 'image' the name=y option wasn't available; cleaner code in _icon() function. Tests at Template:Rail icon/testcases passed |
fix to make sure default does not override icon when set |
||
Line 550:
if line then
local default = data.lines._default or {}▼
if default and default.icon then▼
icon = mw.ustring.gsub(default.icon, '%%1', line_name)▼
end▼
local line_type = args[3] or args.type
if line_type then
Line 572 ⟶ 567:
if not icon then
icon = line.icon
▲ end
▲ local default = data.lines._default or {}
▲ if not icon and default and default.icon then
▲ icon = mw.ustring.gsub(default.icon, '%%1', line_name)
end
end
|