<?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%3APlain_text</id>
	<title>Module:Plain text - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://salisford.net/index.php?action=history&amp;feed=atom&amp;title=Module%3APlain_text"/>
	<link rel="alternate" type="text/html" href="https://salisford.net/index.php?title=Module:Plain_text&amp;action=history"/>
	<updated>2026-05-01T05:20:41Z</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:Plain_text&amp;diff=54&amp;oldid=prev</id>
		<title>ACG2: Created page with &quot;--converts text with wikilinks to plain text, e.g &quot;gah is bar&quot; to &quot;gah is bar&quot; --removes anything enclosed in tags that isn't nested, mediawiki strip markers (refe...&quot;</title>
		<link rel="alternate" type="text/html" href="https://salisford.net/index.php?title=Module:Plain_text&amp;diff=54&amp;oldid=prev"/>
		<updated>2023-04-05T02:09:59Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;--converts text with wikilinks to plain text, e.g &amp;quot;&lt;a href=&quot;/index.php?title=Foo&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Foo (page does not exist)&quot;&gt;gah&lt;/a&gt; is &lt;a href=&quot;/index.php?title=Bar&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Bar (page does not exist)&quot;&gt;bar&lt;/a&gt;&amp;quot; to &amp;quot;gah is bar&amp;quot; --removes anything enclosed in tags that isn&amp;#039;t nested, mediawiki strip markers (refe...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;--converts text with wikilinks to plain text, e.g &amp;quot;[[foo|gah]] is [[bar]]&amp;quot; to &amp;quot;gah is bar&amp;quot;&lt;br /&gt;
--removes anything enclosed in tags that isn't nested, mediawiki strip markers (references etc), files, italic and bold markup&lt;br /&gt;
require[[strict]]&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local text = frame.args[1]&lt;br /&gt;
	local encode = require('Module:yesno')(frame.args.encode)&lt;br /&gt;
	return p._main(text, encode)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(text, encode)&lt;br /&gt;
	if not text then return end&lt;br /&gt;
	text = mw.text.killMarkers(text)&lt;br /&gt;
		:gsub('&amp;amp;nbsp;', ' ') --replace nbsp spaces with regular spaces&lt;br /&gt;
		:gsub('&amp;lt;br ?/?&amp;gt;', ', ') --replace br with commas&lt;br /&gt;
		:gsub('&amp;lt;span.-&amp;gt;(.-)&amp;lt;/span&amp;gt;', '%1') --remove spans while keeping text inside&lt;br /&gt;
		:gsub('&amp;lt;i.-&amp;gt;(.-)&amp;lt;/i&amp;gt;', '%1') --remove italics while keeping text inside&lt;br /&gt;
		:gsub('&amp;lt;b.-&amp;gt;(.-)&amp;lt;/b&amp;gt;', '%1') --remove bold while keeping text inside&lt;br /&gt;
		:gsub('&amp;lt;em.-&amp;gt;(.-)&amp;lt;/em&amp;gt;', '%1') --remove emphasis while keeping text inside&lt;br /&gt;
		:gsub('&amp;lt;strong.-&amp;gt;(.-)&amp;lt;/strong&amp;gt;', '%1') --remove strong while keeping text inside&lt;br /&gt;
		:gsub('&amp;lt;.-&amp;gt;.-&amp;lt;.-&amp;gt;', '') --strip out remaining tags and the text inside&lt;br /&gt;
		:gsub('&amp;lt;.-&amp;gt;', '') --remove any other tag markup&lt;br /&gt;
		:gsub('%[%[%s*[Ff][Ii][Ll][Ee]%s*:.-%]%]', '') --strip out files&lt;br /&gt;
		:gsub('%[%[%s*[Ii][Mm][Aa][Gg][Ee]%s*:.-%]%]', '') --strip out use of image:&lt;br /&gt;
		:gsub('%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:.-%]%]', '') --strip out categories&lt;br /&gt;
		:gsub('%[%[[^%]]-|', '') --strip out piped link text&lt;br /&gt;
		:gsub('([^%[])%[[^%[%]][^%]]-%s', '%1') --strip out external link text&lt;br /&gt;
		:gsub('^%[[^%[%]][^%]]-%s', '') --strip out external link text&lt;br /&gt;
		:gsub('[%[%]]', '') --then strip out remaining [ and ]&lt;br /&gt;
		:gsub(&amp;quot;'''''&amp;quot;, &amp;quot;&amp;quot;) --strip out bold italic markup&lt;br /&gt;
		:gsub(&amp;quot;'''?&amp;quot;, &amp;quot;&amp;quot;) --not stripping out '''' gives correct output for bolded text in quotes&lt;br /&gt;
		:gsub('----+', '') --remove ---- lines&lt;br /&gt;
		:gsub(&amp;quot;^%s+&amp;quot;, &amp;quot;&amp;quot;) --strip leading&lt;br /&gt;
		:gsub(&amp;quot;%s+$&amp;quot;, &amp;quot;&amp;quot;) --and trailing spaces&lt;br /&gt;
		:gsub(&amp;quot;%s+&amp;quot;, &amp;quot; &amp;quot;) --strip redundant spaces&lt;br /&gt;
	if encode then&lt;br /&gt;
		return mw.text.encode(text)&lt;br /&gt;
	else&lt;br /&gt;
		return text&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>ACG2</name></author>
	</entry>
</feed>