Difference between revisions of "Template:Autolink"

From Yugipedia
Jump to: navigation, search
(actually, simplify: there's no reason to actually test if {{{1}}} has bolding/italics, since stripping them when they're not there doesn't do anything and the unlinked {{{1}}} cases are otherwise identical)
(add support for lists (I hope))
Line 1: Line 1:
{{
+
{{ #arraydefine: links | {{{1<nowiki>|Main Page</nowiki>}}} | * | unique }}{{ #arrayprint: links || $x$ | <nowiki/>
   #if: {{ #pos: {{{1}}} | {{!((}} }}
+
* {{
   | {{{1}}}
+
   #if: {{ #pos: $x$ | {{!((}} }}
   | [[{{ #replace: {{ #replace: {{{1<noinclude>|Main Page</noinclude>}}} | ''' }} | '' }}|{{ #if: {{{2|}}} | {{{2}}} | {{{1<noinclude>|Main Page</noinclude>}}} }}]]
+
   | $x$
}}<noinclude>{{Documentation}}</noinclude>
+
   | [[{{ #replace: {{ #replace: $x$ | ''' }} | '' }}|{{ #if: {{{2|}}} | {{{2}}} | $x$ }}]]
 +
}} }}

Revision as of 04:47, 17 July 2013

  • [[{{{1}}}|{{{1|Main Page}}}]]