Permanently protected template

Difference between revisions of "Template:Autolink"

From Yugipedia
Jump to: navigation, search
(allow link text to be overridden whenever {{{1}}} isn't a link, not just when {{{1}}} is unlinked and doesn't have italics or bolding)
(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)
Line 1: Line 1:
 
{{
 
{{
 
   #if: {{ #pos: {{{1}}} | {{!((}} }}
 
   #if: {{ #pos: {{{1}}} | {{!((}} }}
   | {{{1}}} | {{
+
   | {{{1}}}
    #if: {{ #pos: {{{1}}} | '' }}
+
  | [[{{ #replace: {{ #replace: {{{1<noinclude>|Main Page</noinclude>}}} | ''' }} | '' }}|{{ #if: {{{2|}}} | {{{2}}} | {{{1<noinclude>|Main Page</noinclude>}}} }}]]
    | [[{{ #replace: {{ #replace: {{{1}}} | ''' }} | '' }}|{{ #if: {{{2|}}} | {{{2}}} | {{{1}}} }}]]
 
    | [[{{{1<noinclude>|Main Page</noinclude>}}}|{{ #if: {{{2|}}} | {{{2}}} | {{{1<noinclude>|Main Page</noinclude>}}} }}]]
 
  }}
 
 
}}<noinclude>{{Documentation}}</noinclude>
 
}}<noinclude>{{Documentation}}</noinclude>

Revision as of 03:26, 9 July 2013

Main Page