<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://themidnight.wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3AHatnote_list</id>
	<title>Module:Hatnote list - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://themidnight.wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3AHatnote_list"/>
	<link rel="alternate" type="text/html" href="https://themidnight.wiki/index.php?title=Module:Hatnote_list&amp;action=history"/>
	<updated>2026-04-03T17:43:14Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://themidnight.wiki/index.php?title=Module:Hatnote_list&amp;diff=13070&amp;oldid=prev</id>
		<title>Timothy: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://themidnight.wiki/index.php?title=Module:Hatnote_list&amp;diff=13070&amp;oldid=prev"/>
		<updated>2024-04-03T04:22:19Z</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;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 00:22, 3 April 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&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;!-- diff cache key themidnightwiki_wiki:diff:1.41:old-13069:rev-13070 --&gt;
&lt;/table&gt;</summary>
		<author><name>Timothy</name></author>
	</entry>
	<entry>
		<id>https://themidnight.wiki/index.php?title=Module:Hatnote_list&amp;diff=13069&amp;oldid=prev</id>
		<title>wikipedia&gt;Nihiltres: Updated from sandbox: added support for punctuation collapse when text is italicized. The update&#039;s content includes changes by users Johnuniq, Dexxor, and Nihiltres.</title>
		<link rel="alternate" type="text/html" href="https://themidnight.wiki/index.php?title=Module:Hatnote_list&amp;diff=13069&amp;oldid=prev"/>
		<updated>2023-11-13T21:00:31Z</updated>

		<summary type="html">&lt;p&gt;Updated from sandbox: added support for punctuation collapse when text is italicized. The update&amp;#039;s content includes changes by users Johnuniq, Dexxor, and Nihiltres.&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:00, 13 November 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l96&quot;&gt;Line 96:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 96:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--Collapses duplicate punctuation&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--Collapses duplicate punctuation &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;at end of string, ignoring italics and links&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local function punctuationCollapse (text)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local function punctuationCollapse (text)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	local replacements = {&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; 	return text:match(&lt;/ins&gt;&quot;[.?!]&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(&#039;&lt;/ins&gt;?&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;)&lt;/ins&gt;%&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1(&lt;/ins&gt;%]?&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;)&lt;/ins&gt;%&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;2&lt;/ins&gt;%.$&quot;) &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;and &lt;/ins&gt;text&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;:sub&lt;/ins&gt;(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;-2&lt;/ins&gt;) &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;or &lt;/ins&gt;text&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;		[&quot;%.%.$&lt;/del&gt;&quot;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;] = &quot;.&quot;,&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;		&lt;/del&gt;[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;%?%&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;$&quot;] = &quot;&lt;/del&gt;?&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;,&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;		[&quot;%&lt;/del&gt;!&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;%.$&quot;&lt;/del&gt;] &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;= &quot;!&quot;,&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;		[&quot;%.%]%]%.$&quot;] = &quot;.]]&quot;,&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;		[&quot;%&lt;/del&gt;?%&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]&lt;/del&gt;%]&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;%.$&quot;] = &quot;&lt;/del&gt;?&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]]&quot;,&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;		[&quot;%!%]&lt;/del&gt;%&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]&lt;/del&gt;%.$&quot;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;] = &quot;!]]&quot;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	for k, v in pairs(replacements&lt;/del&gt;) &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;do &lt;/del&gt;text &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;= string.gsub&lt;/del&gt;(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;text&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;k, v&lt;/del&gt;) &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;end&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	return &lt;/del&gt;text&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l150&quot;&gt;Line 150:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 141:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		-- until the &amp;quot;and&amp;quot;&amp;#039;s stop. Blanks are ignored: &amp;quot;1|and||and|3&amp;quot; → {1, 3}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		-- until the &amp;quot;and&amp;quot;&amp;#039;s stop. Blanks are ignored: &amp;quot;1|and||and|3&amp;quot; → {1, 3}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		while args[i + 2] == options.andKeyword do&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		while args[i + 2] == options.andKeyword do&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;			if args[i + 3] then  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;			if args[i + 3] then&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;				table.insert(forRow.pages, args[i + 3])&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;				table.insert(forRow.pages, args[i + 3])&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;			end&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;			end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l161&quot;&gt;Line 161:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 152:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		table.insert(forTable, forRow)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		table.insert(forTable, forRow)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	until terminated or i &amp;gt; maxArg&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	until terminated or i &amp;gt; maxArg&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	return forTable&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	return forTable&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key themidnightwiki_wiki:diff:1.41:old-2745:rev-13069:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>wikipedia&gt;Nihiltres</name></author>
	</entry>
	<entry>
		<id>https://themidnight.wiki/index.php?title=Module:Hatnote_list&amp;diff=2745&amp;oldid=prev</id>
		<title>Jens: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://themidnight.wiki/index.php?title=Module:Hatnote_list&amp;diff=2745&amp;oldid=prev"/>
		<updated>2022-04-03T12:15:40Z</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 08:15, 3 April 2022&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>Jens</name></author>
	</entry>
	<entry>
		<id>https://themidnight.wiki/index.php?title=Module:Hatnote_list&amp;diff=2744&amp;oldid=prev</id>
		<title>wikipedia&gt;Nihiltres: Undid revision 1062166786 by Matthiaspaul (talk); should be fixed now, and if not, please ping me with examples as I couldn&#039;t reproduce the original error</title>
		<link rel="alternate" type="text/html" href="https://themidnight.wiki/index.php?title=Module:Hatnote_list&amp;diff=2744&amp;oldid=prev"/>
		<updated>2021-12-26T20:05:24Z</updated>

		<summary type="html">&lt;p&gt;Undid revision 1062166786 by &lt;a href=&quot;/wiki/Special:Contributions/Matthiaspaul&quot; title=&quot;Special:Contributions/Matthiaspaul&quot;&gt;Matthiaspaul&lt;/a&gt; (&lt;a href=&quot;/index.php?title=User_talk:Matthiaspaul&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User talk:Matthiaspaul (page does not exist)&quot;&gt;talk&lt;/a&gt;); should be fixed now, and if not, please ping me with examples as I couldn&amp;#039;t reproduce the original error&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;--------------------------------------------------------------------------------&lt;br /&gt;
--                           Module:Hatnote list                              --&lt;br /&gt;
--                                                                            --&lt;br /&gt;
-- This module produces and formats lists for use in hatnotes. In particular, --&lt;br /&gt;
-- it implements the for-see list, i.e. lists of &amp;quot;For X, see Y&amp;quot; statements,   --&lt;br /&gt;
-- as used in {{about}}, {{redirect}}, and their variants. Also introduced    --&lt;br /&gt;
-- are andList &amp;amp; orList helpers for formatting lists with those conjunctions. --&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local mArguments --initialize lazily&lt;br /&gt;
local mFormatLink = require(&amp;#039;Module:Format link&amp;#039;)&lt;br /&gt;
local mHatnote = require(&amp;#039;Module:Hatnote&amp;#039;)&lt;br /&gt;
local libraryUtil = require(&amp;#039;libraryUtil&amp;#039;)&lt;br /&gt;
local checkType = libraryUtil.checkType&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- List stringification helper functions&lt;br /&gt;
--&lt;br /&gt;
-- These functions are used for stringifying lists, usually page lists inside&lt;br /&gt;
-- the &amp;quot;Y&amp;quot; portion of &amp;quot;For X, see Y&amp;quot; for-see items.&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
--default options table used across the list stringification functions&lt;br /&gt;
local stringifyListDefaultOptions = {&lt;br /&gt;
	conjunction = &amp;quot;and&amp;quot;,&lt;br /&gt;
	separator = &amp;quot;,&amp;quot;,&lt;br /&gt;
	altSeparator = &amp;quot;;&amp;quot;,&lt;br /&gt;
	space = &amp;quot; &amp;quot;,&lt;br /&gt;
	formatted = false&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
--Searches display text only&lt;br /&gt;
local function searchDisp(haystack, needle)&lt;br /&gt;
	return string.find(&lt;br /&gt;
		string.sub(haystack, (string.find(haystack, &amp;#039;|&amp;#039;) or 0) + 1), needle&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Stringifies a list generically; probably shouldn&amp;#039;t be used directly&lt;br /&gt;
local function stringifyList(list, options)&lt;br /&gt;
	-- Type-checks, defaults, and a shortcut&lt;br /&gt;
	checkType(&amp;quot;stringifyList&amp;quot;, 1, list, &amp;quot;table&amp;quot;)&lt;br /&gt;
	if #list == 0 then return nil end&lt;br /&gt;
	checkType(&amp;quot;stringifyList&amp;quot;, 2, options, &amp;quot;table&amp;quot;, true)&lt;br /&gt;
	options = options or {}&lt;br /&gt;
	for k, v in pairs(stringifyListDefaultOptions) do&lt;br /&gt;
		if options[k] == nil then options[k] = v end&lt;br /&gt;
	end&lt;br /&gt;
	local s = options.space&lt;br /&gt;
	-- Format the list if requested&lt;br /&gt;
	if options.formatted then&lt;br /&gt;
		list = mFormatLink.formatPages(&lt;br /&gt;
			{categorizeMissing = mHatnote.missingTargetCat}, list&lt;br /&gt;
		)&lt;br /&gt;
	end&lt;br /&gt;
	-- Set the separator; if any item contains it, use the alternate separator&lt;br /&gt;
	local separator = options.separator&lt;br /&gt;
	for k, v in pairs(list) do&lt;br /&gt;
		if searchDisp(v, separator) then&lt;br /&gt;
			separator = options.altSeparator&lt;br /&gt;
			break&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	-- Set the conjunction, apply Oxford comma, and force a comma if #1 has &amp;quot;§&amp;quot;&lt;br /&gt;
	local conjunction = s .. options.conjunction .. s&lt;br /&gt;
	if #list == 2 and searchDisp(list[1], &amp;quot;§&amp;quot;) or #list &amp;gt; 2 then&lt;br /&gt;
		conjunction = separator .. conjunction&lt;br /&gt;
	end&lt;br /&gt;
	-- Return the formatted string&lt;br /&gt;
	return mw.text.listToText(list, separator .. s, conjunction)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--DRY function&lt;br /&gt;
function p.conjList (conj, list, fmt)&lt;br /&gt;
	return stringifyList(list, {conjunction = conj, formatted = fmt})&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Stringifies lists with &amp;quot;and&amp;quot; or &amp;quot;or&amp;quot;&lt;br /&gt;
function p.andList (...) return p.conjList(&amp;quot;and&amp;quot;, ...) end&lt;br /&gt;
function p.orList (...) return p.conjList(&amp;quot;or&amp;quot;, ...) end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- For see&lt;br /&gt;
--&lt;br /&gt;
-- Makes a &amp;quot;For X, see [[Y]].&amp;quot; list from raw parameters. Intended for the&lt;br /&gt;
-- {{about}} and {{redirect}} templates and their variants.&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
--default options table used across the forSee family of functions&lt;br /&gt;
local forSeeDefaultOptions = {&lt;br /&gt;
	andKeyword = &amp;#039;and&amp;#039;,&lt;br /&gt;
	title = mw.title.getCurrentTitle().text,&lt;br /&gt;
	otherText = &amp;#039;other uses&amp;#039;,&lt;br /&gt;
	forSeeForm = &amp;#039;For %s, see %s.&amp;#039;,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
--Collapses duplicate punctuation&lt;br /&gt;
local function punctuationCollapse (text)&lt;br /&gt;
	local replacements = {&lt;br /&gt;
		[&amp;quot;%.%.$&amp;quot;] = &amp;quot;.&amp;quot;,&lt;br /&gt;
		[&amp;quot;%?%.$&amp;quot;] = &amp;quot;?&amp;quot;,&lt;br /&gt;
		[&amp;quot;%!%.$&amp;quot;] = &amp;quot;!&amp;quot;,&lt;br /&gt;
		[&amp;quot;%.%]%]%.$&amp;quot;] = &amp;quot;.]]&amp;quot;,&lt;br /&gt;
		[&amp;quot;%?%]%]%.$&amp;quot;] = &amp;quot;?]]&amp;quot;,&lt;br /&gt;
		[&amp;quot;%!%]%]%.$&amp;quot;] = &amp;quot;!]]&amp;quot;&lt;br /&gt;
	}&lt;br /&gt;
	for k, v in pairs(replacements) do text = string.gsub(text, k, v) end&lt;br /&gt;
	return text&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Structures arguments into a table for stringification, &amp;amp; options&lt;br /&gt;
function p.forSeeArgsToTable (args, from, options)&lt;br /&gt;
	-- Type-checks and defaults&lt;br /&gt;
	checkType(&amp;quot;forSeeArgsToTable&amp;quot;, 1, args, &amp;#039;table&amp;#039;)&lt;br /&gt;
	checkType(&amp;quot;forSeeArgsToTable&amp;quot;, 2, from, &amp;#039;number&amp;#039;, true)&lt;br /&gt;
	from = from or 1&lt;br /&gt;
	checkType(&amp;quot;forSeeArgsToTable&amp;quot;, 3, options, &amp;#039;table&amp;#039;, true)&lt;br /&gt;
	options = options or {}&lt;br /&gt;
	for k, v in pairs(forSeeDefaultOptions) do&lt;br /&gt;
		if options[k] == nil then options[k] = v end&lt;br /&gt;
	end&lt;br /&gt;
	-- maxArg&amp;#039;s gotten manually because getArgs() and table.maxn aren&amp;#039;t friends&lt;br /&gt;
	local maxArg = 0&lt;br /&gt;
	for k, v in pairs(args) do&lt;br /&gt;
		if type(k) == &amp;#039;number&amp;#039; and k &amp;gt; maxArg then maxArg = k end&lt;br /&gt;
	end&lt;br /&gt;
	-- Structure the data out from the parameter list:&lt;br /&gt;
	-- * forTable is the wrapper table, with forRow rows&lt;br /&gt;
	-- * Rows are tables of a &amp;quot;use&amp;quot; string &amp;amp; a &amp;quot;pages&amp;quot; table of pagename strings&lt;br /&gt;
	-- * Blanks are left empty for defaulting elsewhere, but can terminate list&lt;br /&gt;
	local forTable = {}&lt;br /&gt;
	local i = from&lt;br /&gt;
	local terminated = false&lt;br /&gt;
	-- If there is extra text, and no arguments are given, give nil value&lt;br /&gt;
	-- to not produce default of &amp;quot;For other uses, see foo (disambiguation)&amp;quot;&lt;br /&gt;
	if options.extratext and i &amp;gt; maxArg then return nil end&lt;br /&gt;
	-- Loop to generate rows&lt;br /&gt;
	repeat&lt;br /&gt;
		-- New empty row&lt;br /&gt;
		local forRow = {}&lt;br /&gt;
		-- On blank use, assume list&amp;#039;s ended &amp;amp; break at end of this loop&lt;br /&gt;
		forRow.use = args[i]&lt;br /&gt;
		if not args[i] then terminated = true end&lt;br /&gt;
		-- New empty list of pages&lt;br /&gt;
		forRow.pages = {}&lt;br /&gt;
		-- Insert first pages item if present&lt;br /&gt;
		table.insert(forRow.pages, args[i + 1])&lt;br /&gt;
		-- If the param after next is &amp;quot;and&amp;quot;, do inner loop to collect params&lt;br /&gt;
		-- until the &amp;quot;and&amp;quot;&amp;#039;s stop. Blanks are ignored: &amp;quot;1|and||and|3&amp;quot; → {1, 3}&lt;br /&gt;
		while args[i + 2] == options.andKeyword do&lt;br /&gt;
			if args[i + 3] then &lt;br /&gt;
				table.insert(forRow.pages, args[i + 3])&lt;br /&gt;
			end&lt;br /&gt;
			-- Increment to next &amp;quot;and&amp;quot;&lt;br /&gt;
			i = i + 2&lt;br /&gt;
		end&lt;br /&gt;
		-- Increment to next use&lt;br /&gt;
		i = i + 2&lt;br /&gt;
		-- Append the row&lt;br /&gt;
		table.insert(forTable, forRow)&lt;br /&gt;
	until terminated or i &amp;gt; maxArg&lt;br /&gt;
	&lt;br /&gt;
	return forTable&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Stringifies a table as formatted by forSeeArgsToTable&lt;br /&gt;
function p.forSeeTableToString (forSeeTable, options)&lt;br /&gt;
	-- Type-checks and defaults&lt;br /&gt;
	checkType(&amp;quot;forSeeTableToString&amp;quot;, 1, forSeeTable, &amp;quot;table&amp;quot;, true)&lt;br /&gt;
	checkType(&amp;quot;forSeeTableToString&amp;quot;, 2, options, &amp;quot;table&amp;quot;, true)&lt;br /&gt;
	options = options or {}&lt;br /&gt;
	for k, v in pairs(forSeeDefaultOptions) do&lt;br /&gt;
		if options[k] == nil then options[k] = v end&lt;br /&gt;
	end&lt;br /&gt;
	-- Stringify each for-see item into a list&lt;br /&gt;
	local strList = {}&lt;br /&gt;
	if forSeeTable then&lt;br /&gt;
		for k, v in pairs(forSeeTable) do&lt;br /&gt;
			local useStr = v.use or options.otherText&lt;br /&gt;
			local pagesStr =&lt;br /&gt;
				p.andList(v.pages, true) or&lt;br /&gt;
				mFormatLink._formatLink{&lt;br /&gt;
					categorizeMissing = mHatnote.missingTargetCat,&lt;br /&gt;
					link = mHatnote.disambiguate(options.title)&lt;br /&gt;
				}&lt;br /&gt;
			local forSeeStr = string.format(options.forSeeForm, useStr, pagesStr)&lt;br /&gt;
			forSeeStr = punctuationCollapse(forSeeStr)&lt;br /&gt;
			table.insert(strList, forSeeStr)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if options.extratext then table.insert(strList, punctuationCollapse(options.extratext..&amp;#039;.&amp;#039;)) end&lt;br /&gt;
	-- Return the concatenated list&lt;br /&gt;
	return table.concat(strList, &amp;#039; &amp;#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Produces a &amp;quot;For X, see [[Y]]&amp;quot; string from arguments. Expects index gaps&lt;br /&gt;
-- but not blank/whitespace values. Ignores named args and args &amp;lt; &amp;quot;from&amp;quot;.&lt;br /&gt;
function p._forSee (args, from, options)&lt;br /&gt;
	local forSeeTable = p.forSeeArgsToTable(args, from, options)&lt;br /&gt;
	return p.forSeeTableToString(forSeeTable, options)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- As _forSee, but uses the frame.&lt;br /&gt;
function p.forSee (frame, from, options)&lt;br /&gt;
	mArguments = require(&amp;#039;Module:Arguments&amp;#039;)&lt;br /&gt;
	return p._forSee(mArguments.getArgs(frame), from, options)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>wikipedia&gt;Nihiltres</name></author>
	</entry>
</feed>