Template:!!/sandbox

From Gentoo Wiki
Jump to: navigation, search


Correct

Used alone
Wiki code
{{!!}}
Main version
|
Sandbox version
|


↑ The pipe generated by this template call will not be parsed as wiki markup if used in a table or when passed to a template that forms a wikilink. If you want a pipe that may be parsed as table markup or result in a piped link, use {{!}} instead (see that template's test cases).


Used inside a table cell to display a pipe character
Wiki code
{| class="wikitable"
| this {{!!}} that
|} 
Main version
that
Sandbox version
that


Used in a template parameter to display a pipe character
Wiki code
{{cmd|mount {{!!}} sort}}
Main version
user $mount | sort
Sandbox version
user $mount | sort


↑ Actually, {{!}} could also be used here, but this works fine.


Used in a template parameter to display table wiki markup
Wiki code
{{noop|{{{!!}} class{{=}}"wikitable"<br>
{{!!}} cell contents<br>
{{!!}}}
}}
Main version
{| class="wikitable"

| cell contents
|}

Sandbox version
{| class="wikitable"

| cell contents
|}


↑ This example echoes the one in the documentation of {{!}}, where the output is an actual rendered wikitable (see that documentation for an explanation). This one just shows the code that would have made a table, if fully parsed. Notice that line breaks are "manually" inserted using <br> tags, since single newlines do not become visible line breaks in the output (just as in regular wiki text, where a double-newline [i.e., a "blank line"] is necessary to get a line break). To get this kind of raw-wikicode output, it's probably better to avoid using this template and just wrap normal table wikicode in a <pre> element instead.

Incorrect

Anonymous parameter (no error, but not supported)
Wiki code
{{!!|anything}}
Main version
|
Sandbox version
|
Note
This is the template sandbox page for Template:!! (diff).
See also the companion subpage for test cases.