Difference between revisions of "Template:Code"

From D Wiki
Jump to: navigation, search
(fix wrong tag)
(document workaround for literal =.)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly><span style="font-family:monospace;">{{{1}}}</span></includeonly>
+
<onlyinclude><span style="font-family:monospace;">{{{1}}}</span></onlyinclude>
  
 
Template that allows writing code "inline". For example:
 
Template that allows writing code "inline". For example:
Line 9: Line 9:
 
| Use {{code|@property}} to ...
 
| Use {{code|@property}} to ...
 
|}
 
|}
 +
 +
== Caveat ==
 +
If the template parameter contains an equal sign (=), it needs to be written as &amp;#x3d; instead, otherwise the template will not work correctly.
  
 
== Todo ==
 
== Todo ==
 
[[template:Code]] is currently just a monospace font. It could be enhanced by being made a css style, or an extension.
 
[[template:Code]] is currently just a monospace font. It could be enhanced by being made a css style, or an extension.

Latest revision as of 18:42, 17 February 2013

{{{1}}}

Template that allows writing code "inline". For example:

Example

Use {{code|@property}} to ... Use @property to ...

Caveat

If the template parameter contains an equal sign (=), it needs to be written as &#x3d; instead, otherwise the template will not work correctly.

Todo

template:Code is currently just a monospace font. It could be enhanced by being made a css style, or an extension.