Title: Module:Check for unknown parameters - freem URL Source: https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters Markdown Content: [Jump to content](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#bodyContent) - [x] Main menu Main menu move to sidebar hide Navigation * [Main page](https://freemwiki.com/wiki/Main_Page "Visit the main page [alt-shift-z]") * [Recent changes](https://freemwiki.com/wiki/Special:RecentChanges "A list of recent changes in the wiki [alt-shift-r]") * [Random page](https://freemwiki.com/wiki/Special:Random "Load a random page [alt-shift-x]") * [Help about MediaWiki](https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents) Legal * [Terms](https://freemwiki.com/wiki/Terms_of_Service) * [Privacy Policy](https://freemwiki.com/wiki/Privacy_Policy) * [About](https://freemwiki.com/wiki/About) * [Contact](https://freemwiki.com/wiki/Contact) [![Image 1](https://freemwiki.com/images/freem.svg)**freem**](https://freemwiki.com/wiki/Main_Page) [Search](https://freemwiki.com/wiki/Special:Search "Search freem [alt-shift-f]") Search - [x] Appearance * [Create account](https://freemwiki.com/index.php?title=Special:CreateAccount&returnto=Module%3ACheck+for+unknown+parameters&returntoquery=oldid%3D579570 "You are encouraged to create an account and log in; however, it is not mandatory") * [Log in](https://freemwiki.com/index.php?title=Special:UserLogin&returnto=Module%3ACheck+for+unknown+parameters&returntoquery=oldid%3D579570 "You are encouraged to log in; however, it is not mandatory [alt-shift-o]") - [x] Personal tools * [Create account](https://freemwiki.com/index.php?title=Special:CreateAccount&returnto=Module%3ACheck+for+unknown+parameters&returntoquery=oldid%3D579570 "You are encouraged to create an account and log in; however, it is not mandatory") * [Log in](https://freemwiki.com/index.php?title=Special:UserLogin&returnto=Module%3ACheck+for+unknown+parameters&returntoquery=oldid%3D579570 "You are encouraged to log in; however, it is not mandatory [alt-shift-o]") Pages for logged out editors [learn more](https://freemwiki.com/wiki/Help:Introduction) * [Contributions](https://freemwiki.com/wiki/Special:MyContributions "A list of edits made from this IP address [alt-shift-y]") * [Talk](https://freemwiki.com/wiki/Special:MyTalk "Discussion about edits from this IP address [alt-shift-n]") # Module:Check for unknown parameters - [x] Add languages * [Module](https://freemwiki.com/wiki/Module:Check_for_unknown_parameters "View the module page [alt-shift-c]") * [Discussion](https://freemwiki.com/index.php?title=Module_talk:Check_for_unknown_parameters&action=edit&redlink=1 "Discussion about the content page (page does not exist) [alt-shift-t]") - [x] English * [Read](https://freemwiki.com/wiki/Module:Check_for_unknown_parameters) * [Edit source](https://freemwiki.com/index.php?title=Module:Check_for_unknown_parameters&action=edit "Edit the source code of this page [alt-shift-e]") * [View history](https://freemwiki.com/index.php?title=Module:Check_for_unknown_parameters&action=history "Past revisions of this page [alt-shift-h]") - [x] Tools Tools move to sidebar hide Actions * [Read](https://freemwiki.com/wiki/Module:Check_for_unknown_parameters) * [Edit source](https://freemwiki.com/index.php?title=Module:Check_for_unknown_parameters&action=edit "Edit the source code of this page [alt-shift-e]") * [View history](https://freemwiki.com/index.php?title=Module:Check_for_unknown_parameters&action=history) General * [What links here](https://freemwiki.com/wiki/Special:WhatLinksHere/Module:Check_for_unknown_parameters "A list of all wiki pages that link here [alt-shift-j]") * [Related changes](https://freemwiki.com/wiki/Special:RecentChangesLinked/Module:Check_for_unknown_parameters "Recent changes in pages linked from this page [alt-shift-k]") * [Special pages](https://freemwiki.com/wiki/Special:SpecialPages "A list of all special pages [alt-shift-q]") * [Printable version](javascript:print(); "Printable version of this page [alt-shift-p]") * [Permanent link](https://freemwiki.com/index.php?title=Module:Check_for_unknown_parameters&oldid=579570 "Permanent link to this revision of this page") * [Page information](https://freemwiki.com/index.php?title=Module:Check_for_unknown_parameters&action=info "More information about this page") Appearance move to sidebar hide From freem Revision as of 06:18, 21 October 2025 by [Lukegao](https://freemwiki.com/index.php?title=User:Lukegao&action=edit&redlink=1 "User:Lukegao (page does not exist)")([talk](https://freemwiki.com/index.php?title=User_talk:Lukegao&action=edit&redlink=1 "User talk:Lukegao (page does not exist)") | [contribs](https://freemwiki.com/wiki/Special:Contributions/Lukegao "Special:Contributions/Lukegao"))(1 revision imported) ([diff](https://freemwiki.com/index.php?title=Module:Check_for_unknown_parameters&diff=prev&oldid=579570 "Module:Check for unknown parameters")) [← Older revision](https://freemwiki.com/index.php?title=Module:Check_for_unknown_parameters&direction=prev&oldid=579570 "Module:Check for unknown parameters") | Latest revision (diff) | Newer revision → (diff) _Documentation for this module may be created at [Module:Check for unknown parameters/doc](https://freemwiki.com/index.php?title=Module:Check\_for\_unknown\_parameters/doc&action=edit&redlink=1 "Module:Check for unknown parameters/doc (page does not exist)")_ [](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-1)-- This module may be used to compare the arguments passed to the parent[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-2)-- with a list of arguments, returning a specified result if an argument is[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-3)-- not on the list[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-4)[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-5)require ('strict');[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-6)[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-7)local p = {}[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-8)[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-9)local mapframe_params = {[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-10)'coord',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-11)'coordinates',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-12)'id',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-13)'qid',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-14)'mapframe',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-15)'mapframe-area_km2',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-16)'mapframe-area_mi2',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-17)'mapframe-caption',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-18)'mapframe-coord',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-19)'mapframe-coordinates',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-20)'mapframe-custom',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-21)'mapframe-frame-coord',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-22)'mapframe-frame-coordinates',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-23)'mapframe-frame-height',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-24)'mapframe-frame-width',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-25)'mapframe-geomask',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-26)'mapframe-geomask-fill',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-27)'mapframe-geomask-fill-opacity',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-28)'mapframe-geomask-stroke-color',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-29)'mapframe-geomask-stroke-colour',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-30)'mapframe-geomask-stroke-width',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-31)'mapframe-height',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-32)'mapframe-id',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-33)'mapframe-length_km',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-34)'mapframe-length_mi',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-35)'mapframe-line',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-36)'mapframe-line-stroke-color',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-37)'mapframe-line-stroke-colour',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-38)'mapframe-marker',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-39)'mapframe-marker-color',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-40)'mapframe-marker-colour',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-41)'mapframe-point',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-42)'mapframe-population',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-43)'mapframe-shape',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-44)'mapframe-shape-fill',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-45)'mapframe-shape-fill-opacity',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-46)'mapframe-shape-stroke-color',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-47)'mapframe-shape-stroke-colour',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-48)'mapframe-stroke-color',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-49)'mapframe-stroke-colour',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-50)'mapframe-stroke-width',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-51)'mapframe-switcher',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-52)'mapframe-type',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-53)'mapframe-width',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-54)'mapframe-wikidata',[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-55)'mapframe-zoom'[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-56)}[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-57)[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-58)local function trim(s)[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-59)return s:match('^%s*(.-)%s*$')[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-60)end[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-61)[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-62)local function isnotempty(s)[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-63)return s and s:match('%S')[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-64)end[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-65)[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-66)local function clean(text)[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-67)-- Return text cleaned for display and truncated if too long.[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-68)-- Strip markers are replaced with dummy text representing the original wikitext.[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-69)local pos, truncated[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-70)local function truncate(text)[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-71)if truncated then[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-72)return ''[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-73)end[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-74)if mw.ustring.len(text) > 25 then[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-75)truncated = true[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-76)text = mw.ustring.sub(text, 1, 25) .. '...'[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-77)end[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-78)return mw.text.nowiki(text)[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-79)end[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-80)local parts = {}[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-81)for before, tag, remainder in text:gmatch('([^\127]*)\127[^\127]*%-(%l+)%-[^\127]*\127()') do[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-82)pos = remainder[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-83)table.insert(parts, truncate(before) .. '<' .. tag .. '>...</' .. tag .. '>')[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-84)end[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-85)table.insert(parts, truncate(text:sub(pos or 1)))[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-86)return table.concat(parts)[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-87)end[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-88)[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-89)function p._check(args, pargs)[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-90)if type(args) ~= "table" or type(pargs) ~= "table" then[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-91)-- TODO: error handling[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-92)return[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-93)end[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-94)[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-95)-- create the list of known args, regular expressions, and the return string[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-96)local knownargs = {}[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-97)[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-98)if isnotempty(args['mapframe_args']) then[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-99)for _, v in ipairs(mapframe_params) do[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-100) knownargs[v] = 1[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-101)end[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-102)end[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-103)[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-104)local regexps = {}[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-105)for k, v in pairs(args) do[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-106)if type(k) == 'number' then[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-107)v = trim(v)[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-108)knownargs[v] = 1[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-109)elseif k:find('^regexp[1-9][0-9]*$') then[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-110)table.insert(regexps, '^' .. v .. '$')[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-111)end[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-112)end[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-113)[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-114)-- loop over the parent args, and make sure they are on the list[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-115)local ignoreblank = isnotempty(args['ignoreblank'])[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-116)local showblankpos = isnotempty(args['showblankpositional'])[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-117)local values = {}[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-118)for k, v in pairs(pargs) do[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-119)if type(k) == 'string' and knownargs[k] == nil then[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-120)local knownflag = false[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-121)for _, regexp in ipairs(regexps) do[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-122)if mw.ustring.match(k, regexp) then[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-123)knownflag = true[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-124)break[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-125)end[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-126)end[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-127)if not knownflag and ( not ignoreblank or isnotempty(v) ) then[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-128)table.insert(values, clean(k))[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-129)end[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-130)elseif type(k) == 'number' and knownargs[tostring(k)] == nil then[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-131)local knownflag = false[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-132)for _, regexp in ipairs(regexps) do[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-133)if mw.ustring.match(tostring(k), regexp) then[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-134)knownflag = true[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-135)break[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-136)end[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-137)end[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-138)if not knownflag and ( showblankpos or isnotempty(v) ) then[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-139)table.insert(values, k .. ' = ' .. clean(v))[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-140)end[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-141)end[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-142)end[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-143)[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-144)-- add results to the output tables[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-145)local res = {}[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-146)if #values > 0 then[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-147)local unknown_text = args['unknown'] or 'Found _VALUE_, '[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-148)[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-149)if mw.getCurrentFrame():preprocess( "{{REVISIONID}}" ) == "" then[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-150)local preview_text = args['preview'][](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-151)if isnotempty(preview_text) then[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-152)preview_text = require(['Module:If preview'](https://freemwiki.com/wiki/Module:If_preview))._warning({preview_text})[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-153)elseif preview_text == nil then[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-154)preview_text = unknown_text[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-155)end[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-156)unknown_text = preview_text[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-157)end[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-158)for _, v in pairs(values) do[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-159)-- Fix odd bug for | = which gets stripped to the empty string and[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-160)-- breaks category links[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-161)if v == '' then v = ' ' end[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-162)[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-163)-- avoid error with v = 'example%2' ("invalid capture index")[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-164)local r = unknown_text:gsub('_VALUE_', { _VALUE_ = v})[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-165)table.insert(res, r)[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-166)end[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-167)end[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-168)[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-169)return table.concat(res)[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-170)end[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-171)[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-172)function p.check(frame)[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-173)local args = frame.args[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-174)local pargs = frame:getParent().args[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-175)return p._check(args, pargs)[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-176)end[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-177)[](https://freemwiki.com/index.php?oldid=579570&title=Module%3ACheck_for_unknown_parameters#L-178)return p Retrieved from "[https://freemwiki.com/index.php?title=Module:Check_for_unknown_parameters&oldid=579570](https://freemwiki.com/index.php?title=Module:Check_for_unknown_parameters&oldid=579570)" * This page was last edited on 21 October 2025, at 06:18. * Content is available under [Creative Commons Attribution-ShareAlike 4.0](https://creativecommons.org/licenses/by-sa/4.0/) unless otherwise noted. FreemWiki is operated by **FINGERPOWER DIGITAL TECHNOLOGY LLC** (Colorado, Entity ID 20221978727). * [Privacy Policy](https://freemwiki.com/wiki/Privacy_Policy) * [About](https://freemwiki.com/wiki/About) * [Terms of Service](https://freemwiki.com/wiki/Terms_of_Service) * [Mobile view](https://freemwiki.com/index.php?title=Module:Check_for_unknown_parameters&oldid=579570&mobileaction=toggle_view_mobile)