Documentation for this module may be created at Module:Util/doc
---@param text string
---@return string
local function _resolve_pipe(text)
local func = text:gmatch("|.*")
return func():sub(2)
end
---@return table, table
local function _get_args_and_pargs(frame)
local args = frame.args
local parent = frame:getParent()
local pargs={}
if parent then pargs=parent.args end
return args, pargs
end
local mod = {
get_args_and_pargs = _get_args_and_pargs
}
function mod.resolve_pipe(frame)
local args, pargs = mod.get_args_and_pargs(frame)
local pipe = args[1] or pargs[1] or ""
return _resolve_pipe(pipe)
end
return mod