Template:Delink/sandbox: Difference between revisions
MusikAnimal (talk | contribs) (Create sandbox version of Template:Delink) |
MusikAnimal (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
{{<includeonly>safesubst:</includeonly>#invoke:delink|delink}}<noinclude> | {{<includeonly>safesubst:</includeonly>#invoke:delink|delink/sandbox}}<noinclude> | ||
{{documentation}} | {{documentation}} | ||
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> | <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> | ||
</noinclude> | </noinclude> |
Revision as of 01:30, 5 June 2020
Script error: The function "delink/sandbox" does not exist.
This is the template sandbox page for Template:Delink (diff). |
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
- Basic
{{delink|text}}
- All parameters
Examples
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
Code | Output |
---|---|
{{delink|https://www.example.com}}
|
https://www.example.com |
The above documentation is transcluded from Template:Delink/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |