Template:Delink/doc: Difference between revisions
MusikAnimal (talk | contribs) No edit summary |
MusikAnimal (talk | contribs) No edit summary |
||
Line 3: | Line 3: | ||
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. --> | <!-- Categories go at the bottom of this page and interwikis go in Wikidata. --> | ||
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 [[Help:Colon trick|colon trick]], the [[Help:Pipe trick|pipe trick]] (normal and reverse), nested wikilinks, and invalid link characters. | 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 [[w:Help:Colon trick|colon trick]], the [[w:Help:Pipe trick|pipe trick]] (normal and reverse), nested wikilinks, and invalid link characters. | ||
==Usage== | ==Usage== | ||
Line 11: | Line 11: | ||
; All parameters | ; All parameters | ||
==Examples== | ==Examples== | ||
Line 57: | Line 37: | ||
}}</includeonly> | }}</includeonly> | ||
==Non-examples== | ==Non-examples== | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 66: | Line 45: | ||
| {{delink|https://www.example.com}} | | {{delink|https://www.example.com}} | ||
|} | |} | ||
Latest revision as of 00:27, 27 April 2020
This is a documentation subpage for Template:Delink. It contains usage information, categories and other content that is not part of the original template page. |
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[edit source]
- Basic
{{delink|text}}
- All parameters
Examples[edit source]
Code | Output |
---|---|
{{delink|[[Foo]]}}
|
Foo |
{{delink|[[Foo|Bar]]}}
|
Bar |
{{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[edit source]
Code | Output |
---|---|
{{delink|https://www.example.com}}
|
https://www.example.com |