Permanently protected template

Difference between revisions of "Template:Autolink"

From Yugipedia
Jump to: navigation, search
(don't link autoinserted quotes if they're the first and last parts of the input (and only those parts) (wow, that's ugly >_> ))
m (Protected "Template:Autolink" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{ #replace: {{ #ifeq: {{ #pos: {{{1}}} | ‌ }} | 0
+
{{ #invoke: Autolink | link }}<noinclude>{{Documentation}}</noinclude>
  | {{{1}}}
 
  | {{ #arraydefine: @template:autolink-links | {{{1<noinclude>|{{int:Mainpage}}</noinclude>}}} | * | unique }}{{ #arrayprint: @template:autolink-links || $x$ | {{ #if: {{ #pos: {{{1}}} | * }} | <nowiki/>
 
* }}{{
 
    #if: {{ #pos: $x$ | {{!((}} }}
 
    | $x$
 
    | {{ #ifeq: {{ #pos: $x$ | &zwnj; }} | {{ #expr: {{ #len: $x$ }} - 6 }}
 
      | $x$
 
      | {{ #vardefineecho: $template:autolink-quote | {{ #if: {{and|{{ #ifeq: {{ #pos: $x$ | "" }} | 0 | 1 }}|{{ #ifexpr: {{ #len: $x$ }} = {{ #pos: $x$ | "" | 1 }} + 2 | 1 }}}} | " }} }}[[:{{ #replace: {{ #replace: {{ #replace: $x$ | ''' }} | '' }} | "" }}|{{ #if: {{{2|}}} | {{{2}}} | {{ #if: {{ #var: $template:autolink-quote }} | {{ #replace: $x$ | "" }} | {{ #replace: $x$ | "" | " }} }} }}]]{{ #var: $template:autolink-quote }}
 
    }}
 
  }} }}
 
}} | &zwnj; }}<noinclude>{{Documentation}}</noinclude>
 

Revision as of 18:21, 3 June 2019