View source for Module:File
From Space Station 14 Wiki
You do not have permission to edit this page, for the following reason:
You can view and copy the source of this page.
local p = {}
local getArgs = require('Module:Arguments').getArgs
-- =====================
-- Given a table with positional and/or named fields,
-- generates a new table where each field is a positional one,
-- while also turning named fields into `key=value` values.
--
-- If a field was positional, it remains as is.
-- If a field was named, its key and value are combined in `key=value` format and appended to the end.
--
-- The purpose of this function is to parse arbitrary arguments from a template
-- and turn them into strings that can be used as parameters to things like `[[File]]` in an arbitrary wikitext.
local function extracts_args_to_strings(args)
local res = { }
-- first handle positional args
for _, value in ipairs(args) do
table.insert(res, value)
end
-- then named ones
000
1:0
Templates used on this page:
Return to Module:File.