Template:Trimc/doc

From EUSwiki
< Template:Trimc
Revision as of 00:22, 9 February 2019 by Malcolmmcc (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Usage

{{Trimc|wikilink}}

Trimc trims multiple consecutive colons down to a single colon. Example: {{Trimc|[[::Main page]]}} produces [[:Main page]], which is rendered as "Main page"

On July 11, 2017, a change to the mediawiki software was introduced per gerrit:361597 that made wikilinks beginning with multiple colons (e.g. [[::Main page]]) no longer valid. Since this format used to work, many template defensively insert a colon at the start of the link to ensure that interlanguage links and interwiki links work properly, and when combined with an input that already contains a leading colon, the output they produce is now broken.

This template is designed to be added to such templates to fix double-leading-colon errors.

See Also