<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.you107657.duckdns.org/index.php?action=history&amp;feed=atom&amp;title=Module%3AVersion_link</id>
	<title>Module:Version link - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.you107657.duckdns.org/index.php?action=history&amp;feed=atom&amp;title=Module%3AVersion_link"/>
	<link rel="alternate" type="text/html" href="https://wiki.you107657.duckdns.org/index.php?title=Module:Version_link&amp;action=history"/>
	<updated>2026-09-25T21:23:55Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://wiki.you107657.duckdns.org/index.php?title=Module:Version_link&amp;diff=5424&amp;oldid=prev</id>
		<title>imported&gt;Merge: merge.py</title>
		<link rel="alternate" type="text/html" href="https://wiki.you107657.duckdns.org/index.php?title=Module:Version_link&amp;diff=5424&amp;oldid=prev"/>
		<updated>2026-09-25T10:55:52Z</updated>

		<summary type="html">&lt;p&gt;merge.py&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
local function removePrefix( s, prefixes )&lt;br /&gt;
	local final = s&lt;br /&gt;
	for _, p in ipairs( prefixes ) do&lt;br /&gt;
		final = final:gsub( &amp;#039;^&amp;#039; .. p, &amp;#039;&amp;#039; )&lt;br /&gt;
	end&lt;br /&gt;
	return mw.text.trim(final)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getLast( prefix )&lt;br /&gt;
	return function( s )&lt;br /&gt;
		local last = mw.ustring.match( s, &amp;#039;^.+%s+(%S+)$&amp;#039; )&lt;br /&gt;
		return prefix .. last&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getJava( s )&lt;br /&gt;
	return &amp;#039;Java Edition &amp;#039; .. removePrefix( s, { &amp;#039;[Jj]ava&amp;#039;, &amp;#039; [Ee]dition&amp;#039;, &amp;#039;[Jj][Ee]&amp;#039; } )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getBedrock( s )&lt;br /&gt;
	return &amp;#039;Bedrock Edition &amp;#039; .. removePrefix( s, { &amp;#039;[Bb]edrock&amp;#039;, &amp;#039; [Ee]dition&amp;#039;, &amp;#039;[Bb][Ee]&amp;#039; } )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getPocket( s )&lt;br /&gt;
	if(s:match(&amp;#039;Alpha&amp;#039;) and not s:match(&amp;#039;Realms&amp;#039;)) then&lt;br /&gt;
		return &amp;#039;Pocket Edition &amp;#039; .. mw.getCurrentFrame():callParserFunction( &amp;#039;#dplreplace&amp;#039;, s, &amp;#039;/^(pocket edition|pocket|pe) (Alpha)? ?v?(\\d+\\.\\d+\\.\\d+)? ?(build \\d+)?/i&amp;#039;, &amp;#039;v\\3 alpha \\4&amp;#039; )&lt;br /&gt;
	end&lt;br /&gt;
	return &amp;#039;Pocket Edition &amp;#039; .. removePrefix( s, { &amp;#039;[Pp]ocket&amp;#039;, &amp;#039; [Ee]dition&amp;#039;, &amp;#039;[Pp][Ee]&amp;#039; } )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getEducation( s )&lt;br /&gt;
	return &amp;#039;Minecraft Education &amp;#039; .. removePrefix( s, { &amp;#039;[Ee]ducation&amp;#039;, &amp;#039; [Ee]dition&amp;#039;, &amp;#039;[Ee][Dd][Uu]&amp;#039;, &amp;#039;[Ee][Ee]&amp;#039; } )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getChinese()&lt;br /&gt;
	return &amp;#039;China Edition#History&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getLauncher( s )&lt;br /&gt;
	return &amp;#039;Minecraft launcher#&amp;#039; .. removePrefix( s, { &amp;#039;[Ll]auncher&amp;#039; } )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getPlayStation( s )&lt;br /&gt;
	return removePrefix( s, { &amp;#039;[Pp]layStation&amp;#039;, &amp;#039;[Pp][Ss]&amp;#039; } ) .. &amp;#039;#Legacy Console Edition&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local prefixFunctions = {&lt;br /&gt;
	java = getJava,&lt;br /&gt;
	je = getJava,&lt;br /&gt;
	[&amp;#039;pre-classic&amp;#039;] = getJava,&lt;br /&gt;
	classic = getJava,&lt;br /&gt;
	indev = getJava,&lt;br /&gt;
	infdev = getJava,&lt;br /&gt;
	alpha = getJava,&lt;br /&gt;
	beta = getJava,&lt;br /&gt;
	pe = getPocket,&lt;br /&gt;
	pocket = getPocket,&lt;br /&gt;
	be = getBedrock,&lt;br /&gt;
	bedrock = getBedrock,&lt;br /&gt;
	edu = getEducation,&lt;br /&gt;
	education = getEducation,&lt;br /&gt;
	ee = getEducation,&lt;br /&gt;
	china = getChinese,&lt;br /&gt;
	chinese = getChinese,&lt;br /&gt;
	launcher = getLauncher,&lt;br /&gt;
	earth = getLast( &amp;#039;Earth:&amp;#039; ),&lt;br /&gt;
	dungeons = getLast( &amp;#039;Dungeons:&amp;#039; ),&lt;br /&gt;
	[&amp;#039;dungeons arcade&amp;#039;] = getLast( &amp;#039;Dungeons:&amp;#039; ),&lt;br /&gt;
	legends = getLast( &amp;#039;Legends:&amp;#039; ),&lt;br /&gt;
	realms = getLast( &amp;#039;Realms#&amp;#039; ),&lt;br /&gt;
	[&amp;#039;360&amp;#039;] = getLast( &amp;#039;Xbox 360 Edition &amp;#039; ),&lt;br /&gt;
	xbox360 = getLast( &amp;#039;Xbox 360 Edition &amp;#039; ),&lt;br /&gt;
	xbone = getLast( &amp;#039;Xbox One Edition &amp;#039; ),&lt;br /&gt;
	xb1 = getLast( &amp;#039;Xbox One Edition &amp;#039; ),&lt;br /&gt;
	xbox1 = getLast( &amp;#039;Xbox One Edition &amp;#039; ),&lt;br /&gt;
	ps = getPlayStation,&lt;br /&gt;
	ps3 = getLast( &amp;#039;PlayStation 3 Edition &amp;#039; ),&lt;br /&gt;
	ps4 = getLast( &amp;#039;PlayStation 4 Edition &amp;#039; ),&lt;br /&gt;
	playstation = getLast( &amp;#039;PlayStation 4 Edition &amp;#039; ),&lt;br /&gt;
	psv = getLast( &amp;#039;PlayStation Vita Edition &amp;#039; ),&lt;br /&gt;
	psvita = getLast( &amp;#039;PlayStation Vita Edition &amp;#039; ),&lt;br /&gt;
	wii = getLast( &amp;#039;Wii U Edition Patch &amp;#039; ),&lt;br /&gt;
	wiiu = getLast( &amp;#039;Wii U Edition Patch &amp;#039; ),&lt;br /&gt;
	switch = getLast( &amp;#039;Nintendo Switch Edition &amp;#039; ),&lt;br /&gt;
	nswitch = getLast( &amp;#039;Nintendo Switch Edition &amp;#039; ),&lt;br /&gt;
	[&amp;#039;3ds&amp;#039;] = getLast( &amp;#039;New Nintendo 3DS Edition &amp;#039; ),&lt;br /&gt;
	new = getLast( &amp;#039;New Nintendo 3DS Edition &amp;#039; ),&lt;br /&gt;
	new3ds = getLast( &amp;#039;New Nintendo 3DS Edition &amp;#039; ),&lt;br /&gt;
	minecraftedu = getLast( &amp;#039;MinecraftEdu &amp;#039; ),&lt;br /&gt;
	launcher = getLast( &amp;#039;Launcher &amp;#039; ),&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function p.version( s )&lt;br /&gt;
	local v = s:gsub( &amp;#039;^[Mm]inecraft &amp;#039;, &amp;#039;&amp;#039; )&lt;br /&gt;
	local prefix = mw.text.split( v, &amp;#039;%s&amp;#039; )[1]:lower()&lt;br /&gt;
	local func = prefixFunctions[prefix]&lt;br /&gt;
	if func then&lt;br /&gt;
		return func( v )&lt;br /&gt;
	else&lt;br /&gt;
		return v&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main( f )&lt;br /&gt;
	local args = f&lt;br /&gt;
	if f == mw.getCurrentFrame() then&lt;br /&gt;
		args = require( [[Module:ProcessArgs]] ).merge( false )&lt;br /&gt;
	end&lt;br /&gt;
	local text&lt;br /&gt;
	if args[2]==&amp;#039;&amp;#039; then&lt;br /&gt;
		text = mw.ustring.match( args[1], &amp;#039;^.+%s+(%S+)$&amp;#039; )&lt;br /&gt;
	else&lt;br /&gt;
		text = args[2] or args[1]&lt;br /&gt;
	end&lt;br /&gt;
	return &amp;#039;[[&amp;#039; .. p.version( args[1] ) .. &amp;#039;|&amp;#039; .. text .. &amp;#039;]]&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;Merge</name></author>
	</entry>
</feed>