Content deleted Content added
No edit summary Tag: Reverted |
Anomalocaris (talk | contribs) revert to old revision of this page, as edited by Anomalocaris at 20:08, 13 May 2021 |
||
Line 38:
local randomiseArgs = { ['t'] = galleryLines }
local sortedLines = nonRandom and galleryLines or randomModule.main('array', randomiseArgs)
local galleryContent = table.concat(sortedLines, '\n')
local output = '<div class="' .. containerClassName .. '" style="max-width:' .. normaliseCssMeasurement(maxWidth) .. '; margin:-4em auto;"
return output
end
Line 114 ⟶ 107:
file = mw.ustring.gsub(file, '{{.-([|%]])', '$1')
-- replace pipes and equals (which would otherwise break the {{#tag:}} syntax)
file = mw.ustring.gsub(file, '|', '{{!}}')
file = mw.ustring.gsub(file, '=', '{{=}}')
Line 184 ⟶ 176:
end
p._main = function(args, transclude,
if not args[1] then
return error(linked and 'No page specified' or 'No page specified', 0)
end
local lines = transclude and makeTranscludedGalleryLinesTables(args) or makeGalleryLinesTable(args)
end
|