टेम्पलेट:Val: रिवीजन सभ के बीचा में अंतर
Content deleted Content added
imported>Cpiral Remove recently added noinclude tags to restore readability. |
imported>Cpiral START UNITS: refactored String module calls, plus nbsp is added here instead of val/units |
||
लाइन 81:
|
{{#if:{{{u|}}}
| <!-- if u= has any multiplier or divider symbols -->
{{#ifexpr:{{#invoke:String|find|source={{{u}}}|target=[./*]|plain=false}}
|
{{#invoke:String|replace
|source =
|
<!-- from "what is not [ or |" up to: where next char is ] -->
|replace = (▼
|
|replace = )
}}
| <!-- Same thing, but without replace with parentheses -->
{{#invoke:String|
|
|pattern = [^%[{{
|pattern = %[%[.+{{!}}▼
▲ |replace =
▲ |plain = false
▲ }}
▲ |pattern = ]]
}}
}}
लाइन 112:
-->{{#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
लाइन 118:
{{#invoke:String|replace
|source = {{Val/units|{{{ul}}}|ls={{{long scale}}}}}
|pattern =
|replace = (
|
}}
|pattern =
|replace =
|plain = false
}}
| <!-- normal call -->
Line 137 ⟶ 138:
|source =
{{#invoke:String|replace
|source =
|s = {{Val/units|{{{up}}}}}
|pattern = [^%[{{!}}]+%f[%]]
}}▼
|replace = /(
|plain = false
}}
|pattern =
|replace = )
}}
| <!-- Same thing, but without replace with parentheses -->
{{#invoke:String|replace
|source =
{{#invoke:String|
|
|pattern =
|
▲ |plain = false
}}
|pattern =
|replace = /
}}
}}
Line 165 ⟶ 172:
{{#invoke:String|replace
|source = {{Val/units|{{{upl}}}}}
|pattern =
|replace = /(
|plain = false
|
}}
|pattern =
|replace =
|plain = false
}}
Line 177 ⟶ 184:
{{#invoke:String|replace
|source = {{val/units|{{{upl}}}}}
|pattern =
|replace = /
|plain = false
|
}}
}}
Line 187 ⟶ 194:
{{#if:{{{u|}}}
|
{{#invoke:String|
|
|pattern = [^%[{{
▲ |pattern = %[%[.+{{!}} <!-- keep unit spacing -->
▲ |replace =
▲ |plain = false
▲ }}
▲ |pattern = ]]
▲ |replace =
}}
}}<!--
-->{{#if:{{{ul|}}}
| {{val/units|{{{ul}}}|ls = {{{long scale}}}}}
}}
END UNITS
|