Content deleted Content added
No edit summary |
No edit summary |
||
Line 490:
local link = args.link or mw.ustring.match(line, '%[%[([^%[:|%]]+)[|%]]')
local border_color, text_color
local color_box = data['color box format'] or data['rail box format'] or {}
if line_data then
if line_data['types'] and line_data['types'][typeN] then
Line 495 ⟶ 496:
border_color = Type_data['border color'] or line_data['border color'] or color
text_color = Type_data['text color'] or line_data['text color']
if color_box == 'title' then
lineN = Type_data['short name'] or line_data['short name'] or lineN▼
lineN = Type_data['short name'] or line_data['short name'] or require('Module:Delink')._delink{line}
else
▲ lineN = Type_data['short name'] or line_data['short name'] or lineN
end
else
border_color = line_data['border color'] or color
text_color = line_data['text color']
else
lineN = line_data['short name'] or lineN
end
end
else
Line 507 ⟶ 516:
text_color = text_color and '#' .. text_color or greatercontrast{color}
local bold = (yesno(args.bold) == false) or ';font-weight:bold'
▲ local delink = require('Module:Delink')._delink
if inline == 'route' then -- [[Template:RouteBox]]
if link then
Line 527 ⟶ 535:
end
elseif inline == 'broute' then
if link then
result = '<span style="background-color:#' .. color .. ';border:.075em solid #000;padding:0 .3em">[[' .. link .. '|<span style="color:' .. text_color .. bold .. ';font-size:inherit;white-space:nowrap">' ..
else
result = '<span style="background-color:#' .. color .. ';border:.075em solid #000;padding:0 .3em;color:' .. text_color .. bold .. ';font-size:inherit;white-space:nowrap">' ..
end
else -- [[Template:Legend]] (fallback; duplication to simplify logic)
|