Difference between revisions of "Template:Autolink"
Dinoguy1000 (talk | contribs) (also allow for bolding, in the off-chance it's ever actually needed) |
Dinoguy1000 (talk | contribs) (check for unknown parameters) |
||
(25 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | {{ | + | {{ safesubst:<noinclude/>#invoke: Autolink | link }}{{#invoke:Check for unknown parameters|check|showblankpositional=1|unknown=[[Category:((Autolink)) transclusions using unknown parameters]]|preview=unknown <nowiki>{{Autolink}}</nowiki> parameter "_VALUE_"|1|t}}{{ #if: {{{t|}}} || {{ #if: {{ #pos: {{{1}}} | '' }}{{ #pos: {{{1}}} | "" }}{{ #pos: {{{1}}} | # }}{{ #pos: {{{1}}} | * }}{{ #pos: {{{1}}} | {{!((}} }} | [[((Autolink)) value::{{ #replace: {{ #replace: {{ #replace: {{ #replace: {{{1|}}} | {{!}} | | }} | {{!(}} | [ }} | {{)!}} | ] }} | * | * }}| ]] }} }}<noinclude>{{Documentation}}</noinclude> |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | }}<noinclude>{{Documentation}}</noinclude> |
Latest revision as of 19:31, 31 March 2024
This template uses Lua: |
{{Autolink}} is used to automatically link input while allowing for link syntax and bold, italics, and unlinked quotes.
Usage
Code | Output | Notes |
---|---|---|
{{autolink|Test}} |
Test | Unlinked input |
{{autolink|[[Test]]}} |
Test | Linked input |
{{autolink|[[Test|Foobar]]}} |
Foobar | Linked input with custom link text |
{{autolink|This is a ''test''}} |
This is a test | Unlinked input with italics |
{{autolink|This is a '''test'''}} |
This is a test | Unlinked input with bold |
{{autolink|This is a ""test""}} |
This is a "test" | Unlinked input with quotes |
{{autolink|""This is a test""}} |
"This is a test" | Unlinked input, whole input is quoted |
{{autolink|This is a#test}} |
This is a § test | Unlinked input with a section link |
{{autolink|This is a ""'''''test'''''""}} |
This is a "test" | Unlinked input with quotes, bold, and italics |
{{autolink| * This * That }} |
Unlinked input as a list | |
{{autolink| * This * [[is|a]] * ""'''''test'''''"" }} |
Everything, almost |
See also
- {{Unlink}}, a template that unlinks input
- {{Delink}}, a template that removes all links from input
- {{Formatted link}}, a template for formatting a single link
- Template:Section link on Wikipedia