Difference between revisions of "Template:Unlink/doc"
Dinoguy1000 (talk | contribs) (restore) |
Dinoguy1000 (talk | contribs) (uses Module:Autolink) |
||
Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
<!-- PLEASE ADD CATEGORIES AT THE BOTTOM OF THIS PAGE --> | <!-- PLEASE ADD CATEGORIES AT THE BOTTOM OF THIS PAGE --> | ||
+ | {{Lua|Module:Autolink}} | ||
{{t|Unlink}} is a template that automatically unlinks input, and returns the target of the first link. It takes a single unnamed parameter. | {{t|Unlink}} is a template that automatically unlinks input, and returns the target of the first link. It takes a single unnamed parameter. |
Latest revision as of 20:29, 5 May 2024
This is a documentation subpage for Template:Unlink. It may contain usage information, categories and other content that is not part of the original template page. |
This template uses Lua: |
{{Unlink}} is a template that automatically unlinks input, and returns the target of the first link. It takes a single unnamed parameter.
Usage[edit]
Code | Output | Notes |
---|---|---|
{{Unlink|test}}
|
test | Unlinked input shouldn't change |
{{Unlink|[[test]]}}
|
test | A single link gets unlinked |
{{Unlink|[[test|word]]}}
|
test | Only the link target is returned, custom link text is discarded |
{{Unlink|[[test]]ing}}
|
test | Link postfixes are also discarded... |
{{Unlink|[[test]] words}}
|
test | ...as is any following text... |
{{Unlink|wordy [[test]]}}
|
test | ...and any preceding text |
{{Unlink|[[test]]ing some [[links]]}}
|
test | Only the first link is returned |
See also[edit]
- {{Autolink}}, a template that links input while handling bold, italics, and unlinked quotes
- {{Delink}}, a template that returns input with all links removed