<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mywikibiz.com/index.php?action=history&amp;feed=atom&amp;title=Module%3AHatnote_group%2Fdoc</id>
	<title>Module:Hatnote group/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mywikibiz.com/index.php?action=history&amp;feed=atom&amp;title=Module%3AHatnote_group%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://mywikibiz.com/index.php?title=Module:Hatnote_group/doc&amp;action=history"/>
	<updated>2026-06-14T05:48:28Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.3</generator>
	<entry>
		<id>https://mywikibiz.com/index.php?title=Module:Hatnote_group/doc&amp;diff=471894&amp;oldid=prev</id>
		<title>Zoran: Pywikibot 6.4.0</title>
		<link rel="alternate" type="text/html" href="https://mywikibiz.com/index.php?title=Module:Hatnote_group/doc&amp;diff=471894&amp;oldid=prev"/>
		<updated>2021-07-15T22:00:26Z</updated>

		<summary type="html">&lt;p&gt;Pywikibot 6.4.0&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --&amp;gt;&lt;br /&gt;
Implements {{tl|hatnote group}}, for merging multiple hatnotes into a grouped hatnote.&lt;br /&gt;
&lt;br /&gt;
==Technical details==&lt;br /&gt;
The module attempts to find each hatnote-looking &amp;lt;code&amp;gt;div&amp;lt;/code&amp;gt; element, and parse them into space-separated &amp;lt;code&amp;gt;span&amp;lt;/code&amp;gt; elements wrapped in a larger, generic hatnote.&lt;br /&gt;
&lt;br /&gt;
First, it matches every pattern that &amp;quot;looks like a hatnote&amp;quot; in its input text; this is where most problems are likely to originate as the pattern is fairly sensitive to any difference in the form of a hatnote.&lt;br /&gt;
&lt;br /&gt;
From each of the pattern matches, it constructs a table. Each element (&amp;quot;row&amp;quot;) of the table corresponds to one original hatnote, and is a table that contains a string with the rendered inner content of the hatnote, and an inner table containing any &amp;quot;extra&amp;quot; classes associated with that hatnote (e.g. &amp;lt;code&amp;gt;selfreference&amp;lt;/code&amp;gt; from a {{tl|self reference}} hatnote, or any classes from the &amp;lt;code&amp;gt;extraclasses&amp;lt;/code&amp;gt; parameter of {{tl|hatnote}}).&lt;br /&gt;
&lt;br /&gt;
It also separately looks for all categories in case they're present ''outside'' the hatnote &amp;lt;code&amp;gt;div&amp;lt;/code&amp;gt; element, and adds them to a concatenated string of all &amp;quot;loose categories&amp;quot; to make sure they're not accidentally removed by the hatnote grouping process.&lt;br /&gt;
&lt;br /&gt;
Once all rows are available, it looks at the tables of classes. It adds every class from every row into a table of &amp;quot;universal&amp;quot; classes, then filters out the ones that aren't universal by looking at each row's list and eliminating an item if it isn't present in any one row. Then, &amp;quot;universal&amp;quot; classes are removed from each row's classes table, so that they're not duplicated later.&lt;br /&gt;
&lt;br /&gt;
This processing having been done, each row is formatted with a &amp;lt;code&amp;gt;span&amp;lt;/code&amp;gt; element that includes the extra classes associated with that row, the &amp;lt;code&amp;gt;spans&amp;lt;/code&amp;gt; for each row are joined as a space-separated list, the &amp;quot;loose categories&amp;quot; are tacked on in turn, and then the resulting string is fed into the main hatnote module, with extra classes on the main hatnote being supplied by collating the &amp;quot;universal classes&amp;quot; table into a space-separated list of its keys.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{sandbox other||&lt;br /&gt;
&amp;lt;!-- Categories below this line, please; interwikis at Wikidata --&amp;gt;&lt;br /&gt;
[[Category:Hatnote modules| ]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zoran</name></author>
	</entry>
</feed>