<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://pool.calebcooper.ie/index.php?action=history&amp;feed=atom&amp;title=Template%3ADemo%2Fdoc</id>
	<title>Template:Demo/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://pool.calebcooper.ie/index.php?action=history&amp;feed=atom&amp;title=Template%3ADemo%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://pool.calebcooper.ie/index.php?title=Template:Demo/doc&amp;action=history"/>
	<updated>2026-04-08T02:07:05Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://pool.calebcooper.ie/index.php?title=Template:Demo/doc&amp;diff=11813&amp;oldid=prev</id>
		<title>Caleb Cooper: Created page with &quot;{{Documentation subpage}} {{Lua|Module:Demo}} &lt;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see Wikipedia:Wikidata) -...&quot;</title>
		<link rel="alternate" type="text/html" href="https://pool.calebcooper.ie/index.php?title=Template:Demo/doc&amp;diff=11813&amp;oldid=prev"/>
		<updated>2020-10-16T12:40:53Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Documentation subpage}} {{Lua|Module:Demo}} &amp;lt;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see &lt;a href=&quot;https://en.wikipedia.org/wiki/Wikidata&quot; class=&quot;extiw&quot; title=&quot;wikipedia:Wikidata&quot;&gt;Wikipedia:Wikidata&lt;/a&gt;) -...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Documentation subpage}}&lt;br /&gt;
{{Lua|Module:Demo}}&lt;br /&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;
== Usage ==&lt;br /&gt;
This template simply places template code in a {{tag|pre}} tag and then places the template below the pre tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{demo&lt;br /&gt;
|br =&lt;br /&gt;
|demo_kill_categories =&lt;br /&gt;
|&amp;amp;lt;nowiki&amp;gt;{{your template}}&amp;amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;{{red|IMPORTANT}}&amp;#039;&amp;#039;&amp;#039;: You must wrap include {{tag|nowiki}} tags around the source to be demonstrated (or use {{t|escape}}, which has a demo-escape example), like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;{{demo|&amp;amp;lt;nowiki&amp;gt;[template source]&amp;lt;/nowiki&amp;gt;}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Failure to wrap {{tag|nowiki}} tags around the source may cause the source to be executed before it reaches this template:{{demo|{{fail}}}}&lt;br /&gt;
&lt;br /&gt;
=== Pre style ===&lt;br /&gt;
Set &amp;lt;code&amp;gt;style=&amp;lt;/code&amp;gt; to add any CSS text to the {{tag|pre}} tag.&lt;br /&gt;
&lt;br /&gt;
For example, &amp;lt;code&amp;gt;{{escape|mode=kill|{*{demo!style{{=}}display:inline!&amp;amp;lt;nowiki&amp;gt;{*{done}*}&amp;lt;/nowiki&amp;gt;}*}|*|char=!|{{!}}}}&amp;lt;/code&amp;gt;, would result in:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{demo|style=display:inline|&amp;lt;nowiki&amp;gt;{{done}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Line breaks ===&lt;br /&gt;
You can change the number of line breaks between the pre tag and the template by setting &amp;lt;code&amp;gt;br=&amp;lt;/code&amp;gt; to a number. The default is 1.&lt;br /&gt;
&amp;lt;pre&amp;gt;{{demo|br=3|&amp;amp;lt;nowiki&amp;gt;{{done}}&amp;lt;/nowiki&amp;gt;}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
{{demo|br=5|&amp;lt;nowiki&amp;gt;{{done}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Alternative separator====&lt;br /&gt;
You may also include an alternative separator by setting {{para|br}} to something other than a number and it will take the place of the br tags. For example, {{para|br|&amp;amp;lt;td&amp;gt;}} can make demo fit in a table:&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
|-&lt;br /&gt;
|{{demo|br=&amp;lt;td&amp;gt;|{{((}}done{{))}}}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Category removal ===&lt;br /&gt;
For templates that add categories (e.g. {{t|Asbox}}), set {{para|demo_kill_categories|}} (or {{para|nocat|}}) to anything to prevent them from showing up in the output:&lt;br /&gt;
{{demo|br=produces:|demo_kill_categories=yes&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;{{Asbox&lt;br /&gt;
| image = Østfold_våpen.svg&lt;br /&gt;
| pix = 30&lt;br /&gt;
| subject = [[Østfold]] location&lt;br /&gt;
| name = Template:Østfold-geo-stub&lt;br /&gt;
| category = Østfold geography stubs&lt;br /&gt;
| tempsort = *&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Module ===&lt;br /&gt;
If the template used is based on [[Lua (programming language)|Lua]], you can pass args directly to the demonstrated module by invoking [[Module:Demo]] like so: (this would reduce server stress)&lt;br /&gt;
{{demo|br=0|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
{{#invoke:Demo|module|demo_br=0| demo_module=RoundN | demo_module_func = N2|demo_template = Round2&lt;br /&gt;
|bold_winner=high&lt;br /&gt;
|May 1|Team A|1|Team B|2&lt;br /&gt;
}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Note: It will attempt to preserve line breaks for unnamed params, but such is impossible for named params since those are stripped of whitespace/order before being passed to the module. Also note, you should use {{para|demo_br}} instead of {{para|br}} (all args you don&amp;#039;t want being passed should be prefixed with &amp;#039;demo_&amp;#039; if not already)&lt;br /&gt;
&lt;br /&gt;
== Redirects ==&lt;br /&gt;
* {{tl|Template Pre}}&lt;br /&gt;
* {{tl|Tpre}}&lt;br /&gt;
* {{tl|Doc pre}}&lt;br /&gt;
&lt;br /&gt;
== See also==&lt;br /&gt;
* {{tl|Demo-inline}}, for an inline version of this template&lt;br /&gt;
* {{tl|Escape}} - which has an example of this template without nowiki tags&lt;br /&gt;
* {{tl|Nowiki template demo}} which uses [[Module:Template test case]]&lt;br /&gt;
* {{tl|Automarkup}} which uses [[Module:Automarkup]]&lt;br /&gt;
&lt;br /&gt;
===Other formatting templates===&lt;br /&gt;
{{#lsth:Template:Template-linking_templates|Other formatting templates}}&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:Documentation assistance templates]]&lt;br /&gt;
[[Category:Programming typing-aid templates]]&lt;br /&gt;
[[Category:Template test cases| ]]&lt;br /&gt;
[[Category:Wikipedia utility templates]]&lt;br /&gt;
[[Category:Wikitext processing templates]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Caleb Cooper</name></author>
	</entry>
</feed>