Template:Sharp/doc
Jump to navigation
Jump to search
Usage
This template gives the sharp symbol #. Use {{Sharp}} when you need a sharp symbol # inside a template. It has no parameters.
Examples
- Works for CSS colors returned by {{#switch:}} or {{#if:}} or by templates:
<span style="background:{{#if:1|{{Sharp}}F00}}">test</span>gives correctly:- test
<span style="background:{{#if:1|#F00}}">test</span>still gives correctly:- test (it would not work if the color was returned by a template)
- Works for plain-text literal sharp symbols at start of lines or table cells:
{{Sharp}}xgives correctly:- #x
- But
#xgives the unexpected numbered list:- x
- Works for prefixing anchors in links:
[[Template:Sharp{{#if:1|{{Sharp}}Examples}}|Examples]]gives correctly:- Examples
- But
[[Template:Sharp{{#if:1|#Examples}}|Examples]]gives the unexpected numbered list with a broken link: - [[Template:Sharp
- Examples|Examples]]