Module:Random slideshow/sandbox: Difference between revisions

Content deleted Content added
set fileflags to get the first 100 images (which in most cases should be all images on the page, or in the section
make sure there's always a linebreak
Line 63:
 
function extractRegularFiles(wikitext)
local wikitext = mw.ustring.gsub(wikitext, '%]%]%[%[File:', ']]\n[[File:')
local wikitext = mw.ustring.gsub(wikitext, '|thumb', '')
local wikitext = mw.ustring.gsub(wikitext, '|', '{{!}}')
local files = mw.text.split(wikitext, '%c%s*')
for k, v in pairs(files) do
local f = mw.ustring.gsub(v, '^%[%[(.*)%]%]$', '%1')