Difference between revisions of "Template:Codenowiki/doc"

From blackwiki
Jump to navigation Jump to search
(limitations)
Line 22: Line 22:
  
 
===Limitations===
 
===Limitations===
This template does not work with signatures. Typing {{tlxs|codenowiki|<nowiki>~~~~</nowiki>}} results in displaying your full signature’s code.
+
This template does not work with signatures. Typing {{tlxs|codenowiki|<nowiki>~~~~</nowiki>}} results in displaying your full signature's code.
  
 
===See also===
 
===See also===

Revision as of 14:10, 2 February 2015

This template provides a speedy way to wrap template source code in <code><nowiki>...</nowiki></code> markup. To work correctly, it must be substituted.

Recommended use is:

{{subst:codenowiki |1=(code)}}

i.e. so that anything before an equals (=) sign in the code isn't intepreted as a parameter name.

Example

Template:Plaincode ... outputs: ...  Here be code

The code produced by the template for this output is:

Template:Plaincode

Embedded substitution

If the template is transcluded rather than substituted on a page, its output can be corrected by re-saving the page, triggering the substitution embedded within it:

{{subst:Nowiki|Here be code}}

Limitations

This template does not work with signatures. Typing {{subst:codenowiki|~~~~}} results in displaying your full signature's code.

See also