Module:Adjacent stations/sandbox: Difference between revisions

Content deleted Content added
Undid revision 838763076 by Szqecs (talk)
No edit summary
Line 119:
local function station(s)
local function subst(s2)
if s2 then
return mw.ustring.gsub(s2, '%%1', s)
else
return nil
end
end
if _line['station format'] then
return subst(_line['station format'][s] )
or subst(data[v][1]['station format'][s] )
or mw.ustring.gsubsubst(_line['station format'][1] or data[v][1]['station format'][1], '%%1', s)
else
return subst(data[v][1]['station format'][s]) or mw.ustring.gsubsubst(data[v][1]['station format'][1], '%%1', s)
end
end
Line 180 ⟶ 189:
rowspan = rowspan+1
end
t[i] = mw.ustring.gsubsubst(t[i], '\n|style="', table.concat({'\n|rowspan="', rowspan, '" style="'}))
end
end