Template:Code/doc

From EVE University Wiki
< Template:Code
Revision as of 01:00, 25 February 2017 by Djavin novienta (talk | contribs) (Created page with "<noinclude>{{main|Template:Code}}</noinclude> == Usage == This template allows the presentation of pre-formatted text within the confines of a code-like presentation without t...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Main article: Template:Code

Usage

This template allows the presentation of pre-formatted text within the confines of a code-like presentation without the box taking up the entire width of the page.

Simply add the code or function name you wish to present as the second argument:

  • {{ code | text }}

Example

This code:

{{ code | <nowiki> {{ foo | bar }} </nowiki> }}

Would result in this:

{{ foo | bar }}

And this code:

{{code|Foo
bar
  Hah!}}

Would result in this:

Foo

bar

Hah!

Similarly this code:

{{code|10 PRINT "Hello World!"
20 END}}

Would result in this:

10 PRINT "Hello World!" 20 END

Using it inline, like this:

foo {{code|Foo what? Huh? Huh!}} bar

Would result in this:

Foo

Foo what? Huh? Huh!

bar

This as opposed to how <pre></pre> tags usually work:

Go ahead, use all the width :(