Template:Codenowiki/doc: Difference between revisions
Template page
More actions
adding see also |
|||
| Line 41: | Line 41: | ||
* {{tld|codef}} Same as this, but without the nowiki functionality, useful when the argument needs processing, e. g. italicizing | * {{tld|codef}} Same as this, but without the nowiki functionality, useful when the argument needs processing, e. g. italicizing | ||
* {{tld|pre}} | * {{tld|pre}} | ||
* {{T|Syntaxhighlight}} | |||
{{Semantic markup templates}} | {{Semantic markup templates}} | ||
Revision as of 21:00, 30 July 2026
- This has been copied from the English Wikipedia's Codenowiki template. Some features may be missing.
This template provides a speedy way to wrap template source code in <code> markup.
<nowiki>...</nowiki></code>
Examples
| Code | Result | Remarks |
|---|---|---|
| {{code|1=FOR i:=1 TO ∞ & beyond}} | FOR i:=1 TO ∞ & beyond
|
|
| {{code|<nowiki> ... </nowiki>}} | <nowiki> ... </nowiki>
|
You can use <nowiki> and </nowiki> tags in the argument if you escape them with <
|
| {{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 |, or the opening ({{) and closing brackets (}})
|
| {{code|{{((}}shortcuts{{!}}COM:SCOPE{{))}}}} | {{shortcuts|COM:SCOPE}}
|
Limitations
This template does not work with signatures. Typing {{subst:codenowiki|~~~~}} results in displaying your full signature's code.
See also
- {{codef}} Same as this, but without the nowiki functionality, useful when the argument needs processing, e. g. italicizing
- {{pre}}
- {{Syntaxhighlight}}