Content deleted Content added
explain removal problem |
Improve the alt= movement situation by adding a (somewhat inefficient but safe) check |
||
Line 40:
local sortedLines = nonRandom and galleryLines or randomModule.main('array', randomiseArgs)
for i = 1, #sortedLines do
-- move the alt parameter to the end of the file should it exist to fix linter errors
--
"^(.+)(%{%{!}}alt%{%{=}}[^{]*)(.*)$",
"
if not string.find(altParam,"%[%[") then
sortedLines[i] = sortedLines[i]:gsub(
"^(.+)(%{%{!}}alt%{%{=}}[^{]*)(.*)$",
"%1%3%2")
end
-- insert a switcher-label span just after the first pipe (which has already been escaped as {{!}} instead the | character)
sortedLines[i] = sortedLines[i]:gsub(
|