Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Code: Difference between revisions

Template page
update documentation
formatting simpler examples
Line 3: Line 3:
Copied from [http://en.wikipedia.org/w/index.php?title=Template:Code&oldid=290943733 Wikipedia], can be used in place of {{code|<code>&lt;nowiki> ... &lt;/nowiki></code>}} constructs.
Copied from [http://en.wikipedia.org/w/index.php?title=Template:Code&oldid=290943733 Wikipedia], can be used in place of {{code|<code>&lt;nowiki> ... &lt;/nowiki></code>}} constructs.


{{code|1={{code{{!}}FOR i:=1 TO &#x221e; & beyond}}}} yields {{code|1=FOR i:=1 TO &#x221e; & beyond}}
== Examples ==
 
{|class="wikitable"
 
!Code
You can use {{code|&lt;nowiki>}} and {{code|&lt;/nowiki>}} tags in the argument if you escape them with {{code|&amp;lt;}}
!Result
* {{code|{{code{{!}}&amp;lt;nowiki> ... &amp;lt;/nowiki>}}}} yields <code>&lt;nowiki> ... &lt;/nowiki></code>
!Remarks
 
|-
 
|{{code|1={{code{{!}}FOR i:=1 TO &#x221e; & beyond}}}}
Most other HTML/XML tags should work when you explicitly assign the parameter
|{{code|1=FOR i:=1 TO &#x221e; & beyond}}
 
|
* {{code|{{code{{!}}<span style="font-weight:bold">TEXT</span>}}
|-
}} yields {{code|<span style="font-weight:bold">TEXT</span>}}
|{{code|{{code{{!}}&amp;lt;nowiki> ... &amp;lt;/nowiki>}}}}
* {{code|{{code{{!}}1=<span style="font-weight:bold">TEXT</span>}}
|{{codef|&lt;nowiki> ... &lt;/nowiki>}}
}} yields {{code|1=<span style="font-weight:bold">TEXT</span>}}
|You can use {{code|&lt;nowiki>}} and {{code|&lt;/nowiki>}} tags in the argument if you escape them with {{code|&amp;lt;}}
 
|-
 
|{{code|{{code{{!}}<table>TEXT</table>}}}}
Template calls may work if you escape the pipe character {{code|{{!}}}}
|{{code|<table>TEXT</table>}}
* {{code|{{code{{!}}{{shortcuts{{!}}COM:SCOPE}}}}}} yields {{code|{{shortcuts|COM:SCOPE}}}}
|Most other HTML/XML tags should work without escaping
* {{code|{{code{{!}}{{shortcuts{{((}}!{{))}}COM:SCOPE}}}}}} yields {{code|{{shortcuts{{!}}COM:SCOPE}}}}
|-
|{{code|{{code{{!}}{{shortcuts{{!}}COM:SCOPE}}}}}}
|{{code|{{shortcuts|COM:SCOPE}}}}
|rowspan="2" valign="top"|Template calls may work if you escape the pipe character {{code|{{!}}}}
|-
|{{code|{{code{{!}}{{shortcuts{{((}}!{{))}}COM:SCOPE}}}}}}
|{{code|{{shortcuts{{!}}COM:SCOPE}}}}
|
|}


== See also ==
== See also ==

Revision as of 22:29, 9 January 2010


Copied from Wikipedia, can be used in place of <code><nowiki> ... </nowiki></code> constructs.

Examples

Code Result Remarks
{{code|FOR i:=1 TO ∞ & beyond}} FOR i:=1 TO ∞ & beyond
{{code|&lt;nowiki> ... &lt;/nowiki>}} <nowiki> ... </nowiki> You can use <nowiki> and </nowiki> tags in the argument if you escape them with &lt;
{{code|<table>TEXT</table>}} <table>TEXT</table> Most other HTML/XML tags should work without escaping
{{code|{{shortcuts|COM:SCOPE}}}} [[:Template:Shortcuts]] Template calls may work if you escape the pipe character |
{{code|{{shortcuts{{!}}COM:SCOPE}}}} {{shortcuts|COM:SCOPE}}

See also

  • {{Codef}} Same as this, but without the nowiki functionality, useful when the argument needs processing, e. g. italicizing


Cookies help us deliver our services. By using our services, you agree to our use of cookies.