Module:Arguments: Difference between revisions
No edit summary |
Tag: Rollback |
||
| 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 31: | Line 33: | ||
-- Module dependencies. | -- Module dependencies. | ||
local i18n = require(' | local i18n = require('Module: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 277: | Line 281: | ||
fargs = frame.args | fargs = frame.args | ||
else | else | ||
local title = parent:getTitle():gsub( | local title = parent:getTitle():gsub(SANDBOX_PATTERN, '') | ||
local found = false | local found = false | ||
if matchesTitle(options.wrappers, title) then | if matchesTitle(options.wrappers, title) then | ||