Module:Adjacent stations/sandbox: Difference between revisions

Content deleted Content added
Simplification.
m I’m not sure what these changes are actually supposed to do, but from reading the code it looks like none of them would actually work the same way.
Line 119:
local function station(s)
local function subst(s2)
if s2 then
return mw.ustring.gsub(s2, '%%1', s)
else
return ''
end
end
if _line['station format'] then
return subst(_line['station format'][s] or data[v][1]['station format'][s] or mw.ustring.gsub(_line['station format'][1] or data[v][1]['station format'][1], '%%1', s)
elseif data[v][1]['station format'] then
return subst(data[v][1]['station format'][s] or data[v][1]['station format'][1])
else
return subst(data[v][1]['station format'][s] or mw.ustring.gsub(data[v][1]['station format'][1], '%%1', s)
return ''
end
end
Line 189 ⟶ 180:
rowspan = rowspan+1
end
t[i] = substmw.ustring.gsub(t[i], '\n|style="', table.concat({'\n|rowspan="', rowspan, '" style="'}))
end
end