This module implements {{development versions}}.
[view | edit | history | purge]The above documentation is transcluded from Module:Development versions/doc.
local p = {}
p.list = function( f )
local version = '1.7.10' or 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( '<onlyinclude>' ) then
wikitext = '<onlyinclude>' .. wikitext .. '</onlyinclude>'
end
table.insert( content, '<onlyinclude>=' .. v .. '=</onlyinclude>' .. wikitext )
end
content = table.concat( content )
:gsub( '^.-<onlyinclude>%s*', '\n' )
:gsub( '%s*</onlyinclude>.-<onlyinclude>%s*', '\n' )
:gsub( '%s*</onlyinclude>.*$', '\n' )
:gsub( '\n(=+ *[^\n]+ *=+)', '\n=%1=' )
return f:preprocess( mw.text.trim( content ) )
end
return p