m (|) |
m (code tag) |
||
Line 1: | Line 1: | ||
This template is used to style code, in circumstances where the <nowiki><code></nowiki> does not do the job. | This template is used to style code, in circumstances where the <nowiki><code></nowiki> tag does not do the job. | ||
It adds a horizontal line above and below the code block. | It adds a horizontal line above and below the code block. | ||
It makes sure that the code block does not jump in and out of <nowiki><pre></nowiki> mode as you increase and decrease indentation. | It makes sure that the code block does not jump in and out of <nowiki><pre></nowiki> mode as you increase and decrease indentation. |
Revision as of 13:35, 18 March 2011
This template is used to style code, in circumstances where the <code> tag does not do the job. It adds a horizontal line above and below the code block. It makes sure that the code block does not jump in and out of <pre> mode as you increase and decrease indentation.
To avoid the most common problems with this template, explicitly name the parameter, and do not start the parameter contents with "wiki-removable whitespace". Any occurance of | in the code must be replaced by | or {{!}}
{{code |1= <td align="right" class="catbg"> <img src="', $settings['images_url'], '/smflogo.gif" style="margin: 2px;" alt="" /> </td>}}
<td align="right" class="catbg"> <img src="', $settings['images_url'], '/smflogo.gif" style="margin: 2px;" alt="" /> </td>
For more information on the use of "=" and | within parameter values, please see Meta:Help:Template