Template:Example/code

From Noita Wiki
Jump to navigation Jump to search


This is a formatting template intended to be used within an {{Example}}, to show the code/wikitext input that produces a given result. It's a quick wrapper around <syntaxhighlight>, using the expandy CSS class for styling. For more complex examples, use this directly with code like:

&lt;syntaxhighlight lang="wikitext" class="expandy">
code here
&lt;/syntaxhighlight>

See also:

Usage

{{example/code|

Wikitext (or other) markup to be displayed.

}}
Example 1:
Use of code template within example template

This is an example of using {{example}} with {{example/code}}.

Example 1.1:

To fetch the name of a Spell given its' ID you can use the inline {{SpellName}} template.

Triplicate Bolt
Result:

Triplicate Bolt

Example 2:
Use of parameter to set syntax highlighting
Example 2.1:


for file in *.png
do
    if [ -f "$file" ]
    then
      pngout "$file"
    fi
done