Nhwɛdo:Delink
This template is used on many pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
This template uses Lua: |
This template removes links from wikitext. It de-links wikilinks and URL links, removes HTML comments, and normalises whitespace. It handles most wikitext correctly, including category links, the colon trick, the pipe trick (normal and reverse), nested wikilinks, and invalid link characters.
Usage
sesa mu- Basic
{{delink|text}}
- All parameters
{{delink | 1 = | wikilinks = no | urls = no | comments = no | whitespace = no | refs = yes }}
Parameters
sesa mu1
- the text to be de-linked.wikilinks
- - if set to "no", "n", "false", or "0", wikilinks are not de-linked.
- - if set to "target", wikilinks are reduced to the target portion of a wikilink (
[[
- REDIRECT Template:Angle bracket
This page is a redirect. The following categories are used to track and monitor this redirect:
- From a shortcut: This is a redirect from a shortcut in any namespace to a page in any namespace.
- Shortcuts are wikilinked on community pages, talk pages, and edit summaries, but not in mainspace articles.
When appropriate, protection levels are automatically sensed, described and categorized.
|
- REDIRECT Template:Angle bracket
This page is a redirect. The following categories are used to track and monitor this redirect:
- From a shortcut: This is a redirect from a shortcut in any namespace to a page in any namespace.
- Shortcuts are wikilinked on community pages, talk pages, and edit summaries, but not in mainspace articles.
When appropriate, protection levels are automatically sensed, described and categorized.
]]
→
- REDIRECT Template:Angle bracket
This page is a redirect. The following categories are used to track and monitor this redirect:
|
urls
- if set to "no", "n", "false", or "0", URL links are not de-linked.comments
- if set to "no", "n", "false", or "0", HTML comments are not removed.whitespace
- if set to "no", "n", "false", or "0", whitespace is not normalised. The normalisation makes the whitespace of the resulting text look as if it had been put through the MediaWiki parser. For example, single newlines are converted to a single space, but double newlines are left alone.refs
- (experimental) if set to "yes", "y", "true", or "1", removes references. This is not recommended, as only the [1], [2], etc. markers will be removed - the references themselves will still appear at the end of the page. There is no known workaround for this problem as of April 2014.
Examples
sesa muCode | Output |
---|---|
{{delink|[[Foo]]}}
|
Foo |
{{delink|[[Foo|Bar]]}}
|
Bar |
{{delink|[[Foo|Bar]]|wikilinks=target}}
|
Foo |
{{delink|[[Foo]], [[bar]], and [[baz]].}}
|
Foo, bar, and baz. |
{{delink|I visited [https://www.example.com example.com].}}
|
I visited example.com. |
{{delink|Foo}}
|
Foo |
Non-examples
sesa muCode | Output |
---|---|
{{delink|https://www.example.com}}
|
https://www.example.com |
See also
sesa mu- {{trim brackets}}
- {{delink question hyphen-minus}}
- {{Escape page link from within}}
- {{Linked}} – links if not already linked