<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://culturality.museum/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://culturality.museum/wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3ASuppress_categories"/>
	<link rel="alternate" type="text/html" href="https://culturality.museum/wiki/index.php?title=Module:Suppress_categories&amp;action=history"/>
	<updated>2026-04-04T11:57:31Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://culturality.museum/wiki/index.php?title=Module:Suppress_categories&amp;diff=144&amp;oldid=prev</id>
		<title>Iao: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://culturality.museum/wiki/index.php?title=Module:Suppress_categories&amp;diff=144&amp;oldid=prev"/>
		<updated>2024-04-09T09:57:09Z</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-GB&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 09:57, 9 April 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en-GB&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>Iao</name></author>
	</entry>
	<entry>
		<id>https://culturality.museum/wiki/index.php?title=Module:Suppress_categories&amp;diff=143&amp;oldid=prev</id>
		<title>wikipedia&gt;MusikBot II: Changed protection settings for &quot;Module:Suppress categories&quot;: High-risk template or module: 2510 transclusions (more info) ([Edit=Require extended confirmed access] (indefinite) [Move=Require extended confirmed access] (indefinite))</title>
		<link rel="alternate" type="text/html" href="https://culturality.museum/wiki/index.php?title=Module:Suppress_categories&amp;diff=143&amp;oldid=prev"/>
		<updated>2021-10-26T17:25:37Z</updated>

		<summary type="html">&lt;p&gt;Changed protection settings for &amp;quot;&lt;a href=&quot;/wiki/index.php/Module:Suppress_categories&quot; title=&quot;Module:Suppress categories&quot;&gt;Module:Suppress categories&lt;/a&gt;&amp;quot;: &lt;a href=&quot;https://en.wikipedia.org/wiki/High-risk_templates&quot; class=&quot;extiw&quot; title=&quot;wikipedia:High-risk templates&quot;&gt;High-risk template or module&lt;/a&gt;: 2510 transclusions (&lt;a href=&quot;/wiki/index.php?title=User:MusikBot_II/TemplateProtector&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User:MusikBot II/TemplateProtector (page does not exist)&quot;&gt;more info&lt;/a&gt;) ([Edit=Require extended confirmed access] (indefinite) [Move=Require extended confirmed access] (indefinite))&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, '^(.-)[%s_]*|[%s_]*.-$' )&lt;br /&gt;
    beforePipe = beforePipe or submatch&lt;br /&gt;
    if mw.ustring.match( beforePipe, '[%[%]&amp;lt;&amp;gt;{}%c\n]' ) then&lt;br /&gt;
        return all&lt;br /&gt;
    else&lt;br /&gt;
        return ''&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Preprocess the content if we aren'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;
        '(%[%[[%s_]*[cC][aA][tT][eE][gG][oO][rR][yY][%s_]*:[%s_]*(.-)[%s_]*%]%])',&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>wikipedia&gt;MusikBot II</name></author>
	</entry>
</feed>