From OpenStreetMap Wiki
Jump to: navigation, search


This template gives the sharp symbol #. Use {{Sharp}} when you need a sharp symbol # inside a template. It has no parameters.


  • Works for CSS colors returned by {{#switch:}} or {{#if:}} or by templates:
    <span style="background:{{#if:1|{{Sharp}}F00}}">test</span> gives correctly:
    <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:
    But #x gives the unexpected numbered list:
    1. x
  • Works for prefixing anchors in links:
    [[Template:Sharp{{#if:1|{{Sharp}}Examples}}|Examples]] gives correctly:
    But [[Template:Sharp{{#if:1|#Examples}}|Examples]] gives the unexpected numbered list with a broken link:
  1. Examples|Examples]]

See also