Module:CargoNotes: Difference between revisions
Jump to navigation
Jump to search
Crimsongaia (talk | contribs) (Crimsongaia created the page Module:CargoNotes using a non-default content model "wikitext") |
Crimsongaia (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
local p = {} | |||
function p.drawDataNotes(frame) | |||
local name = frame.args[1] | |||
local wikitext = "" | |||
if (name ~= "") | |||
then | |||
wikitext = "'''" .. name .. ":'''\n" | |||
end | |||
for token in string.gmatch(frame.args[2], '([^;]+)') do | |||
note = token | |||
wikitext = wikitext .. "*" .. note .. "\n" | |||
end | |||
return wikitext | |||
end | |||
return p |
Latest revision as of 21:53, 19 December 2022
local p = {}
function p.drawDataNotes(frame)
local name = frame.args[1]
local wikitext = ""
if (name ~= "") then wikitext = "" .. name .. ":\n" end for token in string.gmatch(frame.args[2], '([^;]+)') do note = token
wikitext = wikitext .. "*" .. note .. "\n"
end
return wikitext
end
return p