<?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%3ASuppress_categories</id>
	<title>Module:Suppress categories - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://themidnight.wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3ASuppress_categories"/>
	<link rel="alternate" type="text/html" href="https://themidnight.wiki/index.php?title=Module:Suppress_categories&amp;action=history"/>
	<updated>2026-04-03T22:42:27Z</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:Suppress_categories&amp;diff=14100&amp;oldid=prev</id>
		<title>Timothy: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://themidnight.wiki/index.php?title=Module:Suppress_categories&amp;diff=14100&amp;oldid=prev"/>
		<updated>2024-04-19T17:26:51Z</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 13:26, 19 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-14099:rev-14100 --&gt;
&lt;/table&gt;</summary>
		<author><name>Timothy</name></author>
	</entry>
	<entry>
		<id>https://themidnight.wiki/index.php?title=Module:Suppress_categories&amp;diff=14099&amp;oldid=prev</id>
		<title>wikimedia&gt;Achim55: Reverted edits by Eg.sh kim (talk) to last revision by Mdaniels5757</title>
		<link rel="alternate" type="text/html" href="https://themidnight.wiki/index.php?title=Module:Suppress_categories&amp;diff=14099&amp;oldid=prev"/>
		<updated>2024-03-18T16:16:12Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;https://commons.wikimedia.org/wiki/Rollback&quot; class=&quot;extiw&quot; title=&quot;commons:Rollback&quot;&gt;Reverted&lt;/a&gt; edits by &lt;a href=&quot;/wiki/Special:Contributions/Eg.sh_kim&quot; title=&quot;Special:Contributions/Eg.sh kim&quot;&gt;Eg.sh kim&lt;/a&gt; (&lt;a href=&quot;/index.php?title=User_talk:Eg.sh_kim&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User talk:Eg.sh kim (page does not exist)&quot;&gt;talk&lt;/a&gt;) to last revision by Mdaniels5757&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 12:16, 18 March 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-7760:rev-14099 --&gt;
&lt;/table&gt;</summary>
		<author><name>wikimedia&gt;Achim55</name></author>
	</entry>
	<entry>
		<id>https://themidnight.wiki/index.php?title=Module:Suppress_categories&amp;diff=7760&amp;oldid=prev</id>
		<title>Timothy: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://themidnight.wiki/index.php?title=Module:Suppress_categories&amp;diff=7760&amp;oldid=prev"/>
		<updated>2023-06-12T15:53:36Z</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 11:53, 12 June 2023&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-7759:rev-7760 --&gt;
&lt;/table&gt;</summary>
		<author><name>Timothy</name></author>
	</entry>
	<entry>
		<id>https://themidnight.wiki/index.php?title=Module:Suppress_categories&amp;diff=7759&amp;oldid=prev</id>
		<title>wikimedia&gt;Mdaniels5757: Copy from w:en:Module:Suppress categories. Attribution: User:Mr. Stradivarius.</title>
		<link rel="alternate" type="text/html" href="https://themidnight.wiki/index.php?title=Module:Suppress_categories&amp;diff=7759&amp;oldid=prev"/>
		<updated>2020-05-24T22:34:46Z</updated>

		<summary type="html">&lt;p&gt;Copy from &lt;a href=&quot;https://en.wikipedia.org/wiki/en:Module:Suppress_categories&quot; class=&quot;extiw&quot; title=&quot;w:en:Module:Suppress categories&quot;&gt;w:en:Module:Suppress categories&lt;/a&gt;. Attribution: User:Mr. Stradivarius.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- This is a simple module to strip categories from wikitext. It does&lt;br /&gt;
-- not support nested links or magic words like __TOC__, etc. Even so,&lt;br /&gt;
-- it should still handle most categories.&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Detects if a category link is valid or not. If it is valid,&lt;br /&gt;
-- the function returns the blank string. If not, the input&lt;br /&gt;
-- is returned with no changes.&lt;br /&gt;
local function processCategory( all, submatch )&lt;br /&gt;
    local beforePipe = mw.ustring.match( submatch, &amp;#039;^(.-)[%s_]*|[%s_]*.-$&amp;#039; )&lt;br /&gt;
    beforePipe = beforePipe or submatch&lt;br /&gt;
    if mw.ustring.match( beforePipe, &amp;#039;[%[%]&amp;lt;&amp;gt;{}%c\n]&amp;#039; ) then&lt;br /&gt;
        return all&lt;br /&gt;
    else&lt;br /&gt;
        return &amp;#039;&amp;#039;&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Preprocess the content if we aren&amp;#039;t being called from #invoke,&lt;br /&gt;
-- and pass it to gsub to remove valid category links.&lt;br /&gt;
local function suppress( content, isPreprocessed )&lt;br /&gt;
    if not isPreprocessed then&lt;br /&gt;
        content = mw.getCurrentFrame():preprocess( content )&lt;br /&gt;
    end&lt;br /&gt;
    content = mw.ustring.gsub(&lt;br /&gt;
        content,&lt;br /&gt;
        &amp;#039;(%[%[[%s_]*[cC][aA][tT][eE][gG][oO][rR][yY][%s_]*:[%s_]*(.-)[%s_]*%]%])&amp;#039;,&lt;br /&gt;
        processCategory&lt;br /&gt;
    )&lt;br /&gt;
    return content&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Get the content to suppress categories from, and find&lt;br /&gt;
-- whether the content has already been preprocessed. (If the&lt;br /&gt;
-- module is called from #invoke, it has been preprocessed already.)&lt;br /&gt;
function p.main( frame )&lt;br /&gt;
    local content, isPreprocessed&lt;br /&gt;
    if frame == mw.getCurrentFrame() then&lt;br /&gt;
        content = frame:getParent().args[1]&lt;br /&gt;
        if frame.args[1] then&lt;br /&gt;
            content = frame.args[1]&lt;br /&gt;
        end&lt;br /&gt;
        isPreprocessed = true&lt;br /&gt;
    else&lt;br /&gt;
        content = frame&lt;br /&gt;
        isPreprocessed = false&lt;br /&gt;
    end&lt;br /&gt;
    return suppress( content, isPreprocessed )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>wikimedia&gt;Mdaniels5757</name></author>
	</entry>
</feed>