Template:Code

From JoJo's Bizarre Encyclopedia - JoJo Wiki
Revision as of 20:55, 27 February 2024 by Paisley Park (talk | contribs) (Created page with "<includeonly><span style="{{#ifeq:{{{wrap|false}}}|false|overflow: hidden; white-space: nowrap;}}">{{#tag:code|{{#ifeq:{{{nowiki|true}}}|true|{{#tag:nowiki|{{{1|}}}}}|{{{1|}}}}}}}</span></includeonly><noinclude> Applies the {{code|<nowiki><code></nowiki>}} and {{code|<nowiki><nowiki></nowiki>}} tags to the input, and also forces the code block to stay in one line, rather than allowing for line breaks. ==Parameters== <pre> 1 = Content you want to apply the formattin...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Applies the <code> and <nowiki> tags to the input, and also forces the code block to stay in one line, rather than allowing for line breaks.

Parameters

1      = Content you want to apply the formatting to.
wrap   = Whether to allow text wrapping or not. "false" by default.
nowiki = "true" by default. Set to "false" to disable the <nowiki> tags.

Usage

Example: If a block of code reaches the end of a line, the entire thing will go onto a new line together, like if I did some random text like this that I wanted to stay in one line for reading clarity. This example is exaggerated though. Usually, you'd only have 2-3 words in cases like these.

If a block of code reaches the end of a line, the entire thing will go onto a new line together, like if I did {{code|some random text like this that I wanted to stay in one line for reading clarity}}. This example is exaggerated though. Usually, you'd only have 2-3 words in cases like these.

Example: [[Hex Data]], Hex Data

{{code|[[Hex Data]]}}, {{code|[[Hex Data]]|nowiki=0}}

Example: The following text will not insist on being on the same line, instead wrapping with the end of the page: try zooming in to see what happens.

The following text will not insist on being on the same line: {{code|try zooming in to see what happens|wrap=true}}.