Module:Sandbox/Aidan9382: Difference between revisions

Content deleted Content added
Weird behaviour, lets note it down
Tag: Reverted
More tests and some pain
Tag: Reverted
Line 24:
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]]''')
Line 35 ⟶ 37:
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:expandTemplate({title="#tag",args={"gallery",inputPiped,mode="slideshow",class="switcher-container"}}) --I wish
return table.concat(results,"\n\n<hr>\n\n")
end