Template:Val: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Cpiral
See previous two edit summar
meta>Cpiral
Using new LK parameter
Line 195: Line 195:
     |
     |
     {{#ifexpr:{{#invoke:String|find|source={{{u}}}|target=[%[<]|plain=false}}
     {{#ifexpr:{{#invoke:String|find|source={{{u}}}|target=[%[<]|plain=false}}
       |&nbsp;{{{u}}}<!--sole u has [[mark<up>]], just return it
       |&nbsp;{{{u}}}<!--sole u has [[mark<up>]] chars [ or <, just return it.
   -->|&nbsp;{{#invoke:String|match
   -->|&nbsp;{{#invoke:String|match
         |s = {{val/units|{{{u}}}}}
         |s = [{{val/units|{{{u}}}|lk=off}}] <!-- fake links added -->
        <!-- lk=off is just in case we default to Convert, for some cases
        because the pattern on the next line only ever handles one link
        per compound unit -->
         |pattern = [^%[{{!}}]+%f[%]]
         |pattern = [^%[{{!}}]+%f[%]]
        <!-- that pattern extracts link displays like this: [this] [or|this]
        convert can send [this]/[that], but we can't do that. So above I had to
        add fake links s = [added]. -->
         |ignore_errors = true
         |ignore_errors = true
       }}
       }}

Revision as of 05:45, 12 June 2015