Template:Sharp/doc
Jump to navigation
Jump to search
This is a documentation subpage for Template:Sharp. It contains usage information, categories and other content or metadata that is not part of the original template. |
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}}x
gives correctly:- #x
- But
#x
gives 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]]