Module:Arguments: Difference between revisions

Jump to navigation Jump to search
m Protected "Module:Arguments" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))
No edit summary
Line 1: Line 1:
-- based on https://dev.fandom.com/wiki/Module:Arguments?oldid=160378
--- Arguments invocation argument extractor for Scribunto modules.
--- Arguments invocation argument extractor for Scribunto modules.
--  It is intended for use by other Lua modules, and should not be
--  It is intended for use by other Lua modules, and should not be
Line 33: Line 31:


--  Module dependencies.
--  Module dependencies.
local i18n = require('Module:I18n').loadMessages('Arguments')
local i18n = require('Dev:I18n').loadMessages('Arguments')
local util = require('libraryUtil')
local util = require('libraryUtil')
local checkType = util.checkType
local checkType = util.checkType
local SANDBOX_PATTERN = '/Draft$'


-- Four different value tidying functions.
-- Four different value tidying functions.
Line 281: Line 277:
                 fargs = frame.args
                 fargs = frame.args
             else
             else
                 local title = parent:getTitle():gsub(SANDBOX_PATTERN, '')
                 local title = parent:getTitle():gsub('/sandbox$', '')
                 local found = false
                 local found = false
                 if matchesTitle(options.wrappers, title) then
                 if matchesTitle(options.wrappers, title) then