Template:Val: Difference between revisions
From Zoophilia Wiki
Jump to navigationJump to search
meta>Headbomb |
meta>Cpiral New START UNITS section |
||
| Line 78: | Line 78: | ||
START UNITS | START UNITS | ||
-->{{#if:{{{up|}}}{{{upl|}}} | |||
-->{{#if:{{{up|}}}{{{upl|}}}<!-- | | | ||
{{#if:{{{u|}}} | |||
| | |||
{{#ifexpr:{{#invoke:String|find|source={{{u}}}|target=[./*]|plain=false}} | |||
| | |||
{{#invoke:String|replace | |||
|source = | |||
{{#invoke:String|replace | |||
<!-- [[title|markup]]: & (or [) is 1st, [ is 7th (or 1st)--> | |||
|source = {{Val/units/sandbox|{{{u}}}}} | |||
|pattern = %[%[.+{{!}} <!--keeps , but compare others --> | |||
|replace = ( | |||
|plain = false | |||
}} | |||
|pattern = ]] | |||
|replace = ) | |||
--> | }} | ||
| <!-- Same thing, but without replace with parentheses --> | |||
{{#invoke:String|replace | |||
|source = | |||
{{#invoke:String|replace | |||
|source = {{Val/units/sandbox|{{{u}}}}} | |||
|pattern = %[%[.+{{!}} | |||
|replace = | |||
|plain = false | |||
}} | |||
|pattern = ]] | |||
|replace = | |||
}} | |||
}} | |||
}}<!-- end up/upl AND u | |||
-->{{#if:{{{ul|}}} <!-- With up/upl its possible to have neither u nor ul.--> | |||
| | |||
{{#ifexpr:{{#invoke:String|find|source={{{ul}}}|target=[./*]|plain=false}} | |||
| <!-- Grouping parentheses --> | |||
{{#invoke:String|replace | |||
|source = | |||
{{#invoke:String|replace | |||
|source = {{Val/units/sandbox|{{{ul}}}|ls={{{long scale}}}}} | |||
|pattern = [ <!-- keep spacing --> | |||
|replace = ([ | |||
|count = 1 | |||
}} | |||
|pattern = %]%] | |||
|replace = ]]) | |||
|plain = false <!-- using %]%], not ]], prevents code mangle --> | |||
}} | |||
| <!-- normal call --> | |||
{{val/units/sandbox|{{{ul}}}|ls = {{{long scale}}}}} | |||
}} | |||
}}<!-- End up/upl AND ul | |||
-->{{#if:{{{up|}}} | |||
| | |||
{{#ifexpr:{{#invoke:String|find|source={{{up}}}|target=[./*]|plain=false}} | |||
| | |||
{{#invoke:String|replace | |||
|source = | |||
{{#invoke:String|replace | |||
|source = {{Val/units/sandbox|{{{up}}}}} | |||
|pattern = .*%[%[.+{{!}} <!-- remove spacing --> | |||
|replace = /( | |||
|plain = false | |||
}} | |||
|pattern = ]] | |||
|replace = ) | |||
}} | |||
| <!-- Same thing, but without replace with parentheses --> | |||
{{#invoke:String|replace | |||
|source = | |||
{{#invoke:String|replace | |||
|source = {{Val/units/sandbox|{{{up}}}}} | |||
|pattern = .*%[%[.+{{!}} | |||
|replace = / | |||
|plain = false | |||
}} | |||
|pattern = ]] | |||
|replace = | |||
}} | |||
}} | |||
| <!-- upl --> | |||
{{#ifexpr:{{#invoke:String|find|source={{{upl}}}|target=[./*]|plain=false}} | |||
| | |||
{{#invoke:String|replace | |||
|source = | |||
{{#invoke:String|replace | |||
|source = {{Val/units/sandbox|{{{upl}}}}} | |||
|pattern = .-%[ <!-- remove spacing --> | |||
|replace = /([ | |||
|plain = false | |||
|count = 1 | |||
}} | |||
|pattern = %]%] | |||
|replace = ]]) | |||
|plain = false | |||
}} | |||
| <!-- Same thing, but without replace with parentheses --> | |||
{{#invoke:String|replace | |||
|source = {{val/units/sandbox|{{{upl}}}}} | |||
|pattern = .-%[ <!-- remove spacing: PCRE is .*?[ --> | |||
|replace = /[ | |||
|plain = false | |||
|count = 1 | |||
}} | |||
}} | |||
}} | |||
| <!-- No up/upl --> | |||
{{#if:{{{u|}}} | |||
| | |||
{{#invoke:String|replace | |||
|source = | |||
{{#invoke:String|replace | |||
|source = {{val/units/sandbox|{{{u}}}}} | |||
|pattern = %[%[.+{{!}} <!-- keep unit spacing --> | |||
|replace = | |||
|plain = false | |||
}} | |||
|pattern = ]] | |||
|replace = | |||
}} | |||
}}<!-- | |||
-->{{#if:{{{ul|}}} | |||
|{{val/units/sandbox|{{{ul}}}|ls = {{{long scale}}}}} | |||
}} | |||
}}<!-- end up/upl | |||
END UNITS | END UNITS | ||
Revision as of 09:10, 2 June 2015
Lua error in Module:Documentation at line 7: Module:Documentation/config returned boolean, table expected.