v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "Template:Wikisrc"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
(Created page with "{{#rreplace:{{{1}}}|(.)|<code>$1</code>}}<noinclude> This displays the generated wiki source code ''before rendering'' (for debugging complex templates) Example: <pre>{{wikisr...")
 
(Examples)
Line 2: Line 2:
 
This displays the generated wiki source code ''before rendering'' (for debugging complex templates)
 
This displays the generated wiki source code ''before rendering'' (for debugging complex templates)
 
Example:
 
Example:
<pre>{{wikisrc|This is a [[link]] and a {{template}}.}}</pre>
+
<pre>{{wikisrc|This is a [[link]].}}</pre>
{{wikisrc|This is a [[link]] and a {{template}}.}}
+
{{wikisrc|This is a [[link]].}}
 +
 
 +
Note that templates are expanded:
 +
<pre>{{wikisrc|This is a [[link]] and a {{template}}}}</pre>
 +
{{wikisrc|This is a [[link]] and a {{template}}}}
 +
({{tl|template}} does not exist, so a link is produced to it instead.)
 +
 
 +
A recursive example:
 +
<pre>{{wikisrc|A {{wikisrc}} example}}</pre>
 +
{{wikisrc|A {{wikisrc}} example}}
 +
 
 +
<pre>{{wikisrc|A {{wikisrc|A {{wikisrc}} example}} example}}</pre>
 +
{{wikisrc|A {{wikisrc|An inner {{wikisrc}} inclusion}} example}}
  
 
</noinclude>
 
</noinclude>

Revision as of 17:24, 25 May 2013

{{{1}}} This displays the generated wiki source code before rendering (for debugging complex templates) Example:

{{wikisrc|This is a [[link]].}}

This is a [[link]].

Note that templates are expanded:

{{wikisrc|This is a [[link]] and a {{template}}}}

This is a [[link]] and a [[:Template:Template]] ({{template}} does not exist, so a link is produced to it instead.)

A recursive example:

{{wikisrc|A {{wikisrc}} example}}

A <code>{</code><code>{</code><code>{</code><code>1</code><code>}</code><code>}</code><code>}</code> example

{{wikisrc|A {{wikisrc|A {{wikisrc}} example}} example}}

A <code>A</code><code>n</code><code> </code><code>i</code><code>n</code><code>n</code><code>e</code><code>r</code><code> </code><code><</code><code>c</code><code>o</code><code>d</code><code>e</code><code>></code><code>{</code><code><</code><code>/</code><code>c</code><code>o</code><code>d</code><code>e</code><code>></code><code><</code><code>c</code><code>o</code><code>d</code><code>e</code><code>></code><code>{</code><code><</code><code>/</code><code>c</code><code>o</code><code>d</code><code>e</code><code>></code><code><</code><code>c</code><code>o</code><code>d</code><code>e</code><code>></code><code>{</code><code><</code><code>/</code><code>c</code><code>o</code><code>d</code><code>e</code><code>></code><code><</code><code>c</code><code>o</code><code>d</code><code>e</code><code>></code><code>1</code><code><</code><code>/</code><code>c</code><code>o</code><code>d</code><code>e</code><code>></code><code><</code><code>c</code><code>o</code><code>d</code><code>e</code><code>></code><code>}</code><code><</code><code>/</code><code>c</code><code>o</code><code>d</code><code>e</code><code>></code><code><</code><code>c</code><code>o</code><code>d</code><code>e</code><code>></code><code>}</code><code><</code><code>/</code><code>c</code><code>o</code><code>d</code><code>e</code><code>></code><code><</code><code>c</code><code>o</code><code>d</code><code>e</code><code>></code><code>}</code><code><</code><code>/</code><code>c</code><code>o</code><code>d</code><code>e</code><code>></code><code> </code><code>i</code><code>n</code><code>c</code><code>l</code><code>u</code><code>s</code><code>i</code><code>o</code><code>n</code> example