Difference between revisions of "Template:Value list"

From Yugipedia
Jump to: navigation, search
(allow list items to be unlinked)
(prettify output code a bit (this is mainly to benefit the documentation; I don't think it'll affect anything else but could be wrong))
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{IfSemantics
+
{{ #if: {{{1|}}}
   |{{#arraymap:* {{{1}}}
+
   | {{ #arraydefine: @vl_list | {{{1}}} | * }}{{ #arraysearcharray: @vl_list | @vl_list | /.+/ }}{{ #ifeq: {{ #arraysize: @vl_list }} | 1
    |*
+
    | {{ #arrayprint: @vl_list || $list_item | $list_item[[{{ #if: 1 | {{{2}}} }}::{{unlink|{{ #explode: $list_item | &lt;ref }}}}| ]] }}
    |$x$
+
    | {{ #arrayprint: @vl_list || $list_item | <nowiki/>
    |* [[{{{2}}}::{{ #ifeq: {{ #sub: $x$ || 1 }} | [ | {{ #sub: $x$ | 2 | -2 }} | {{ #explode: $x$ | &lt;ref }} }}]]<!-- Re-add after Negref is reenabled {{#negref:$x$|$y$|$ref$|$ref$}}-->
+
* $list_item[[{{ #if: 1 | {{{2}}} }}::{{unlink|{{ #explode: $list_item | &lt;ref }}}}| ]]
    |\n
+
    }}
  }}
+
   }}
   |{{{1}}}
+
}}<noinclude>
}}</includeonly><noinclude>
 
  
 
{{documentation}}</noinclude>
 
{{documentation}}</noinclude>

Revision as of 22:36, 14 December 2019