Module:Sandbox/PhiH/Route
Appearance
![]() | This module is rated as pre-alpha. It is unfinished, and may or may not be in active development. It should not be used from article namespace pages. Modules remain pre-alpha until the original editor (or someone who takes one over if it is abandoned for some time) is satisfied with the basic structure. |
Usage
{{#invoke:Sandbox/PhiH|route=|inv=}}
Stnlnk
if {{{2}}} if empty:
- {{{1}}} railway station
else:
- {{{1}}}_railway_station_({{{2}}})
- {{{1}}}_({{{2}}})_railway_station
- {{{1}}}_({{{2}}}_station)
- {{{1}}}_station_({{{2}}})
- {{{1}}}_({{{2}}})
- {{{1}}} railway station, {{{2}}}
local p = {}
function p.route(frame)
local route = frame.args.route
local inv = frame.args.inv
local list = mw.text.split(route, '\n')
local output = ''
for i, v in ipairs(list) do
if not (i == 1) then output = output .. '–' end
output = output .. '[[' .. v .. ' railway station|' .. v .. ']]'
end
return output
end
return p