Subpages
Code analysis
Basic code analysis for Module:Sandbox/Aidan9382 | |
---|---|
Scope | Message |
Scope starting line 4 | data is defined but never referenced
|
Scope starting line 8 | data is defined but never referenced
|
Scope starting line 13 | data is defined but never referenced
|
Test invokes
This does nothing as of right now. 1756334496
Script error: The function "notrealfunction" does not exist.
parenting Script error: The function "parentingLogic" does not exist.
Script error: The function "getargs" does not exist.
Script error: The function "testGP" does not exist.
Script error: The function "magicWordTests" does not exist.
require("strict")
local p = {}
function p.main(data)
return "<div style=text-align:right;font-size:80%>This does nothing as of right now. "..os.time().."</div>"
end
function p.iloveregexold(data)
local r = "%[?%[?.-:([^{|]+)%]?%]?"
local args = {mw.ustring.match("[[File:Hey.jpg|thumb|left|250px]]",r)}
return table.concat(args," -- ")
end
function p.iloveregex(data)
--This assumes [[ is present, and that therefore ]] is present
local r = "%[%[%a-:([^{|]+)(.+)%]%]"
local args = {mw.ustring.match("[[File:Hey.jpg|thumb|left|250px|All for [[Module:Excerpt/portals]]|alt=text]]",r)}
return table.concat(args," -- ")
end
function p:namecall()
return self
end
function p.pipeProcessingAbsurdityTest(frame)
-- To do with [[Module:Random slideshow]]
-- I need this to somehow expand the tags with the input having pipes
-- Since if we remove pipes and use {{1}}, advanced wikitext causes linter errors and terrible display failures
-- {{#tag:gallery|' .. galleryContent .. '|mode=slideshow|class=switcher-container}}
local inputUnpiped = [==[File:MH-60S Helicopter dumps water onto Fire.jpg{{!}}<span class="switcher-label" style="display:none"><span class="randomSlideshow-sr-only">Image 1</span></span>Water is used for [[fire fighting{{!}}fighting]] [[wildfire]]s. (from '''[[Water]]''')
File:Water molecule (1).svg{{!}}<span class="switcher-label" style="display:none"><span class="randomSlideshow-sr-only">Image 2</span></span>A water molecule consists of two hydrogen atoms and one oxygen atom (from '''[[Water]]''')
File:Water withdrawals per capita, OWID.svg{{!}}<span class="switcher-label" style="display:none"><span class="randomSlideshow-sr-only">Image 3</span></span>Total water withdrawals for agricultural, industrial and municipal purposes per capita, measured in cubic metres (m³) per year in 2010 (from '''[[Water]]''')
File:Icosahedron-spinoza.jpg{{!}}<span class="switcher-label" style="display:none"><span class="randomSlideshow-sr-only">Image 4</span></span>[[Icosahedron]] as a part of [[Baruch Spinoza{{!}}Spinoza]] monument in [[Amsterdam]]. (from '''[[Water]]'''){{!}}alt{{=}}Icosahedron as a part of Spinoza monument in Amsterdam.
File:Sterilewater.jpg{{!}}<span class="switcher-label" style="display:none"><span class="randomSlideshow-sr-only">Image 5</span></span>Sterile water for injection (from '''[[Water]]''')]==]
-- just the first five images given out by galleryContent in Random slideshow.makeOutput()
local inputPiped = string.gsub(inputUnpiped,"{{!}}","|")
local results = {}
results[#results+1] = frame:preprocess("{{#tag:gallery|" .. inputUnpiped .. "|mode=slideshow|class=switcher-container}}")
results[#results+1] = frame:preprocess("{{#tag:gallery|" .. inputPiped .. "|mode=slideshow|class=switcher-container}}")
results[#results+1] = frame:preprocess(string.gsub(inputPiped,"\n","\n\n"))
results[#results+1] = frame:preprocess("{{#invoke:Text|concatParams|" .. inputPiped .. "}}")
results[#results+1] = frame:preprocess("{{#tag:gallery|{{#invoke:Text|concatParams|" .. inputPiped .. "}}|mode=slideshow|class=switcher-container}}")
results[#results+1] = frame:extensionTag({name="gallery",content=inputPiped,args={mode="slideshow",class="switcher-container"}})
--results[#results+1] = frame:expandTemplate({title="#tag",args={"gallery",inputPiped,mode="slideshow",class="switcher-container"}}) --I wish
return table.concat(results,"\n\n<hr>\n\n")
end
return p