Template:Sharp
Jump to navigation
Jump to search
This documentation is transcluded from Template:Sharp/doc. (Edit | history)
Note to editors: Please don't categorize this template by editing it directly. Instead, place the category in its documentation page, in its "includeonly" section.
Note to editors: Please don't categorize this template by editing it directly. Instead, place the category in its documentation page, in its "includeonly" section.
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]]