Module:Random slideshow/sandbox: Difference between revisions

Content deleted Content added
Temporary somewhat working fix for the advanced-look processing/linter errors by avoiding (some) pipe replacement. This also disables the expansion of templates, as it was causing issues and im not entirely sure why its used right now other than for the old sake of {{#tag:
Remove unused log and unused lines from pipe modification
Line 130:
-- remove sizes, which sometimes get mistaken for captions
file = mw.ustring.gsub(file, '|%s*%d*x?%d+%s*px%s*([|%]])', '%1')
-- expand templates
-- file = mw.ustring.gsub(file, '{%b{}}', expand)
-- remove loose closing braces which don't have matching opening braces
-- file = mw.ustring.gsub(file, '}}', '')
-- remove loose opening braces which don't have matching closing braces (and the subsequent content, which is probably just a template name)
-- file = mw.ustring.gsub(file, '{{.-([|%]])', '%1')
-- replace pipes and equals (which would otherwise break the {{#tag:}} syntax)
-- file = mw.ustring.gsub(file, '|%s*alt%s*=', '{{!}}alt=')
-- file = mw.ustring.gsub(file, '|', '{{!}}')
-- file = mw.ustring.gsub(file, '=', '{{=}}')
-- remove linebreaks
file = mw.ustring.gsub(file, '\n\n', '<br>')
Line 147 ⟶ 137:
file = mw.ustring.gsub(file, '%]%]$', '')
table.insert(files, file)
mw.log(file)
end
return files