<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://nvwiki.org/index.php?action=history&amp;feed=atom&amp;title=Module%3ADemo%2Fdoc</id>
	<title>Module:Demo/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://nvwiki.org/index.php?action=history&amp;feed=atom&amp;title=Module%3ADemo%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://nvwiki.org/index.php?title=Module:Demo/doc&amp;action=history"/>
	<updated>2026-05-13T17:01:19Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://nvwiki.org/index.php?title=Module:Demo/doc&amp;diff=1128&amp;oldid=prev</id>
		<title>Huanker: 1 revision imported: Import modules used with Template:Infobox software</title>
		<link rel="alternate" type="text/html" href="https://nvwiki.org/index.php?title=Module:Demo/doc&amp;diff=1128&amp;oldid=prev"/>
		<updated>2025-12-26T16:57:21Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported: Import modules used with Template:Infobox software&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 16:57, 26 December 2025&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>Huanker</name></author>
	</entry>
	<entry>
		<id>https://nvwiki.org/index.php?title=Module:Demo/doc&amp;diff=1127&amp;oldid=prev</id>
		<title>wikipedia&gt;Cedar101: /* Usage via templates */ {{xtag}}</title>
		<link rel="alternate" type="text/html" href="https://nvwiki.org/index.php?title=Module:Demo/doc&amp;diff=1127&amp;oldid=prev"/>
		<updated>2024-08-30T04:59:10Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Usage via templates: &lt;/span&gt; {{xtag}}&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Module rating |release&amp;lt;!-- Values:  pre-alpha • alpha • beta • release • protected  --  If a rating not needed/relevant, delete this template call --&amp;gt;}}&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;
&lt;br /&gt;
=== Usage via templates ===&lt;br /&gt;
This module supports {{t|Demo}}&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;#invoke:{{BASEPAGENAME}}|&amp;#039;&amp;#039;main&amp;#039;&amp;#039;}}&lt;br /&gt;
&lt;br /&gt;
and {{t|Demo inline}}&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;#invoke:{{BASEPAGENAME}}|&amp;#039;&amp;#039;inline&amp;#039;&amp;#039;}}&lt;br /&gt;
&lt;br /&gt;
The input must be wrapped in {{xtag|nowiki}} tags or else it may be processed before the module can read it.&lt;br /&gt;
&lt;br /&gt;
=== Usage in a module ===&lt;br /&gt;
If you want to use this in another module (such as to make the output prettier), you can get values like so:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;require(&amp;#039;Module:demo&amp;#039;).get(frame)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function {{code|get()}} returns a table containing:&lt;br /&gt;
*&amp;lt;code&amp;gt;source&amp;lt;/code&amp;gt; = the source code (without {{xtag|syntaxhighlight}} wrappers, characters substituted with html entities)&lt;br /&gt;
*&amp;lt;code&amp;gt;output&amp;lt;/code&amp;gt; = the execution result of the source.&lt;br /&gt;
*&amp;lt;code&amp;gt;frame&amp;lt;/code&amp;gt; = the frame from which this template took the parameter.&lt;br /&gt;
&lt;br /&gt;
By default, {{code|get()}} takes the first parameter of frame. If the frame uses a different parameter name for the nowiki-wrapped source, then place that name (as a string) as the second parameter, like so {{code|require(&amp;#039;Module:demo&amp;#039;).get(frame, &amp;#039;alternate_name&amp;#039;)|lua}}&lt;br /&gt;
&lt;br /&gt;
Example: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local parts = require(&amp;#039;Module:demo&amp;#039;).get(frame)&lt;br /&gt;
	return &amp;#039;…Pretty HTML… &amp;lt;pre&amp;gt;&amp;#039; .. parts.source .. &amp;#039;&amp;lt;/pre&amp;gt; …More pretty HTML… &amp;#039; .. parts.output .. &amp;#039; …Even more pretty HTML…&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Template:Nowiki template demo]] which uses [[Module:Template test case]]&lt;br /&gt;
* [[Template:Automarkup]] which uses [[Module:Automarkup]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{#ifeq:{{SUBPAGENAME}}|sandbox | |&lt;br /&gt;
&amp;lt;!-- Categories below this line, please; interwikis at Wikidata --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Module documentation pages]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>wikipedia&gt;Cedar101</name></author>
	</entry>
</feed>