<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wikimd.org/index.php?action=history&amp;feed=atom&amp;title=Module%3AWikitext_Parsing%2Fdoc</id>
	<title>Module:Wikitext Parsing/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wikimd.org/index.php?action=history&amp;feed=atom&amp;title=Module%3AWikitext_Parsing%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://wikimd.org/index.php?title=Module:Wikitext_Parsing/doc&amp;action=history"/>
	<updated>2026-05-11T02:10:00Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wikimd.org/index.php?title=Module:Wikitext_Parsing/doc&amp;diff=6551581&amp;oldid=prev</id>
		<title>Prab: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://wikimd.org/index.php?title=Module:Wikitext_Parsing/doc&amp;diff=6551581&amp;oldid=prev"/>
		<updated>2026-05-04T13:59:28Z</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 13:59, 4 May 2026&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>Prab</name></author>
	</entry>
	<entry>
		<id>https://wikimd.org/index.php?title=Module:Wikitext_Parsing/doc&amp;diff=6551580&amp;oldid=prev</id>
		<title>en&gt;Aidan9382: some adjustments</title>
		<link rel="alternate" type="text/html" href="https://wikimd.org/index.php?title=Module:Wikitext_Parsing/doc&amp;diff=6551580&amp;oldid=prev"/>
		<updated>2025-10-13T10:48:09Z</updated>

		<summary type="html">&lt;p&gt;some adjustments&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{High risk}}&lt;br /&gt;
{{cascade-protected template|page=module}}&lt;br /&gt;
This module provides some functions to help with the complex edge cases involved in modules like [[Module:Template parameter value]] which intend to process the raw wikitext of a page while respecting nowiki tags or similar content reliably. This module is designed to be called by other modules, and does not support invoking.&lt;br /&gt;
&lt;br /&gt;
== PrepareText ==&lt;br /&gt;
{{Module rating|release}}&lt;br /&gt;
&amp;lt;code&amp;gt;PrepareText(text, keepComments)&amp;lt;/code&amp;gt; will run any content within certain tags that normally disable processing ({{tag|nowiki|o}}, {{tag|pre|o}}, {{tag|syntaxhighlight|o}}, {{tag|source|o}}, {{tag|math|o}}) through mw.text.nowiki and remove HTML comments. This allows for tricky syntax to be parsed through more basic means such as &amp;lt;code&amp;gt;%b{}&amp;lt;/code&amp;gt; by other modules without worrying about edge cases.&lt;br /&gt;
&lt;br /&gt;
If the second parameter, &amp;lt;code&amp;gt;keepComments&amp;lt;/code&amp;gt;, is set to true, the content of HTML comments will be passed through mw.text.nowiki instead of being removed entirely.&lt;br /&gt;
&lt;br /&gt;
Any code using this function directly should consider using mw.text.decode to correct the output at the end if part of the processed text is returned, though this will also decode any input that was encoded but not inside a no-processing tag, which likely isn&amp;#039;t a significant issue but still something worth noting.&lt;br /&gt;
&lt;br /&gt;
== ParseTemplates ==&lt;br /&gt;
{{Module rating|alpha}}&lt;br /&gt;
&amp;lt;code&amp;gt;ParseTemplates(InputText, dontEscape)&amp;lt;/code&amp;gt; will attempt to parse all &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{Templates}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; on a page, handling multiple factors such as &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[Wikilinks]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{{Variables}}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; among other complex syntax. Due to the complexity of the function, it is considerably slow, and should be used carefully. The function returns a list of template objects in order of appearance, which have the following properties:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Args&amp;#039;&amp;#039;&amp;#039;: A key-value set of arguments, not in order&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;ArgOrder&amp;#039;&amp;#039;&amp;#039;: A list of keys in the order they appear in the template&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Children&amp;#039;&amp;#039;&amp;#039;: A list of template objects that are contained within the existing template, in order of appearance. Only immediate children are listed&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;: The name of the template&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Text&amp;#039;&amp;#039;&amp;#039;: The raw text of the template&lt;br /&gt;
&lt;br /&gt;
If the second parameter, &amp;lt;code&amp;gt;dontEscape&amp;lt;/code&amp;gt;, is set to true, the inputted text won&amp;#039;t be ran through the &amp;lt;code&amp;gt;PrepareText&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;br /&gt;
&amp;lt;!-- Categories below this line; interwikis at Wikidata --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>en&gt;Aidan9382</name></author>
	</entry>
</feed>