Difference between revisions of "Template:Code"

From RimWorld Wiki
Jump to navigation Jump to search
(Created page with "<noinclude> This is the "Code" template. It should be called in the following format: <pre> {{Code |1=(code content) }} </pre> Edit the page to see the template text. </noincl...")
 
(Hopefully I didn't break anything, but documentation via the /doc is preferable.)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>
+
<includeonly><code>{{#tag:nowiki|{{{1|}}}}}</code></includeonly><noinclude>
This is the "Code" template.
+
{{documentation}}
It should be called in the following format:
+
</noinclude>
<pre>
 
{{Code
 
|1=(code content)
 
}}
 
</pre>
 
Edit the page to see the template text.
 
</noinclude><includeonly>
 
<code><nowiki>{{{1|}}}</nowiki></code>
 
</includeonly>
 

Latest revision as of 12:41, 31 October 2020

Documentation icon Template documentation[view] [edit] [history] [purge]

Description[edit]

This template can be used to display text as in-line code.

Example Usage[edit]

The line:

{{Code | CODE CONTENT GOES HERE }}

Results in: CODE CONTENT GOES HERE

Alternative[edit]

It is possible to just use the html tags directly, as they are not that long:

<code>CODE CONTENT GOES HERE</code>