<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://salisford.net/index.php?action=history&amp;feed=atom&amp;title=Module%3ACheck_winner_by_scores</id>
	<title>Module:Check winner by scores - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://salisford.net/index.php?action=history&amp;feed=atom&amp;title=Module%3ACheck_winner_by_scores"/>
	<link rel="alternate" type="text/html" href="https://salisford.net/index.php?title=Module:Check_winner_by_scores&amp;action=history"/>
	<updated>2026-05-02T05:57:26Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.36.1</generator>
	<entry>
		<id>https://salisford.net/index.php?title=Module:Check_winner_by_scores&amp;diff=733&amp;oldid=prev</id>
		<title>Cascadia: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://salisford.net/index.php?title=Module:Check_winner_by_scores&amp;diff=733&amp;oldid=prev"/>
		<updated>2023-04-05T14:39:27Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:39, 5 April 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Cascadia</name></author>
	</entry>
	<entry>
		<id>https://salisford.net/index.php?title=Module:Check_winner_by_scores&amp;diff=728&amp;oldid=prev</id>
		<title>wp&gt;Legoktm: Replace Module:No globals with require( &quot;strict&quot; )</title>
		<link rel="alternate" type="text/html" href="https://salisford.net/index.php?title=Module:Check_winner_by_scores&amp;diff=728&amp;oldid=prev"/>
		<updated>2022-10-21T21:13:41Z</updated>

		<summary type="html">&lt;p&gt;Replace &lt;a href=&quot;/index.php?title=Module:No_globals&quot; title=&quot;Module:No globals&quot;&gt;Module:No globals&lt;/a&gt; with require( &amp;quot;strict&amp;quot; )&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;require('strict')&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local function format_score(s)&lt;br /&gt;
	s = mw.ustring.gsub(s or '', '^[%s\']*([%d%.]+)[%s\']*[–−—%-][%s\']*([%d%.]+)', '%1–%2')&lt;br /&gt;
	s = mw.ustring.gsub(s, '^%s*([%d%.]+)%s*&amp;amp;[MmNn][Dd][Aa][Ss][Hh];%s*([%d%.]+)', '%1–%2')&lt;br /&gt;
	s = mw.ustring.gsub(s, '^%s*(%[%[[^%[%]]*%|[%d%.]+)%s*%-%s*([%d%.]+)', '%1–%2')&lt;br /&gt;
	s = mw.ustring.gsub(s, '^%s*(%[[^%[%]%s]*%s+[%d%.]+)%s*%-%s*([%d%.]+)', '%1–%2')&lt;br /&gt;
	s = mw.ustring.gsub(s, '^%s*(%[%[[^%[%]]*%|[%d%.]+)%s*&amp;amp;[MmNn][Dd][Aa][Ss][Hh];%s*([%d%.]+)', '%1–%2')&lt;br /&gt;
	s = mw.ustring.gsub(s, '^%s*(%[[^%[%]%s]*%s+[%d%.]+)%s*&amp;amp;[MmNn][Dd][Aa][Ss][Hh];%s*([%d%.]+)', '%1–%2')&lt;br /&gt;
	return s&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local getArgs = require('Module:Arguments').getArgs&lt;br /&gt;
	local args = getArgs(frame, { parentFirst = true })&lt;br /&gt;
	local n1 = args[1] or 'X'&lt;br /&gt;
	local n2 = args[2] or 'X'&lt;br /&gt;
	local s  = args['sc'] or (n1..'–'..n2)&lt;br /&gt;
&lt;br /&gt;
	s = format_score(s)&lt;br /&gt;
	&lt;br /&gt;
    -- following codes obtained from Module:Sports results&lt;br /&gt;
	-- delink if necessary&lt;br /&gt;
	if s:match('^%s*%[%[[^%[%]]*%|([^%[%]]*)%]%]') then&lt;br /&gt;
		s = s:match('^%s*%[%[[^%[%]]*%|([^%[%]]*)%]%]')&lt;br /&gt;
	end&lt;br /&gt;
	if s:match('^%s*%[[^%[%]%s]*%s([^%[%]]*)%]') then&lt;br /&gt;
		s = s:match('^%s*%[[^%[%]%s]*%s([^%[%]]*)%]')&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- get the scores&lt;br /&gt;
	local s1 = tonumber(mw.ustring.gsub( s or '',&lt;br /&gt;
		'^%s*([%d][%d%.]*)%s*–%s*([%d][%d%.]*).*', '%1' ) or nil)&lt;br /&gt;
		or mw.ustring.gsub(s or '', '^([WL]*)–([WL]*).*', '%1' )&lt;br /&gt;
		or ''&lt;br /&gt;
	local s2 = tonumber(mw.ustring.gsub( s or '',&lt;br /&gt;
		'^%s*([%d][%d%.]*)%s*–%s*([%d][%d%.]*).*', '%2' ) or nil)&lt;br /&gt;
		or mw.ustring.gsub(s or '', '^([WL]*)–([WL]*).*', '%2' )&lt;br /&gt;
		or ''&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
	if type(s1) == 'number' and type(s2) == 'number' then&lt;br /&gt;
		return (s1 &amp;gt; s2) and 'W' or ((s2 &amp;gt; s1) and 'L' or 'T')&lt;br /&gt;
	elseif s1:match('[WL]') and s2:match('[WL]') and s1 ~= s2 then&lt;br /&gt;
		return s1&lt;br /&gt;
	else&lt;br /&gt;
		return string.format(&amp;quot;''%s''&amp;quot;, 'Result unknown')&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>wp&gt;Legoktm</name></author>
	</entry>
</feed>