Module:Development versions

local p = {} p.list = function( f ) local version = f:getParent.args[1] local getContent = function( type ) return f:callParserFunction( '#dpl', {			category = version .. ' ' .. type,			format = ',|%PAGE%'		} ) end local devVersions = mw.text.trim( getContent( 'snapshots' ) .. getContent( 'pre-releases' ), '|' ) local content = {} for v in mw.text.gsplit( devVersions, '|' ) do		local wikitext = mw.title.new( v ):getContent if not wikitext:match( ' ' ) then wikitext = ' ' .. wikitext .. ' '		end table.insert( content, ' =' .. v .. '= ' .. wikitext ) end content = table.concat( content ) :gsub( '^.- %s*', '\n' ) :gsub( '%s* .- %s*', '\n' ) :gsub( '%s* .*$', '\n' ) :gsub( '\n(=+%s*[^=\n]+%s*=+) *\n', '\n=%1=\n' ) return f:preprocess( mw.text.trim( content ) ) end return p