Template:Rp: Difference between revisions
From Zoophilia Wiki
Jump to navigationJump to search
meta>Rich Farmbrough No edit summary |
meta>Mdaniels5757 convert to hyphens to en-dashes in certain cases per TPER |
||
| Line 7: | Line 7: | ||
|{{#if: {{{at|}}} | |{{#if: {{{at|}}} | ||
|(<span {{#if:{{{q|{{{quote|}}}}}}|style="border-bottom: 1px dashed;" title='"{{#tag:nowiki|{{#invoke:String|replace|{{trim quotes|s={{{q|{{{quote}}}}}}}}|"|"}}}}"'}}>{{{at}}}</span>) | |(<span {{#if:{{{q|{{{quote|}}}}}}|style="border-bottom: 1px dashed;" title='"{{#tag:nowiki|{{#invoke:String|replace|{{trim quotes|s={{{q|{{{quote}}}}}}}}|"|"}}}}"'}}>{{{at}}}</span>) | ||
|<nowiki>:</nowiki><span {{#if:{{{q|{{{quote|}}}}}}|style="border-bottom: 1px dashed;" title='"{{#tag:nowiki|{{#invoke:String|replace|{{trim quotes|s={{{q|{{{quote}}}}}}}}|"|"}}}}"'}}>{{{1|}}}</span> | |<nowiki>:</nowiki><span {{#if:{{{q|{{{quote|}}}}}}|style="border-bottom: 1px dashed;" title='"{{#tag:nowiki|{{#invoke:String|replace|{{trim quotes|s={{{q|{{{quote}}}}}}}}|"|"}}}}"'}}>{{trim| | ||
{{#invoke:String|replace| | |||
{{#invoke:String|replace| | |||
{{#invoke:String|replace|{{{1|}}}|(%d+)%-(%d+)|%1–%2|plain=false}} <!-- Match all ranges of numbers e.g. 1-2 --> | |||
|(%d+)%-%s*$|%1–|plain=false}} <!-- Match all like "1-" which only have whitespace after and then end of parameter --> | |||
|(%d+)%-,([%s][^%s]+)|%1–%2|plain=false}} <!-- Match all like "2-, 10" but never "1-," --> | |||
}}</span> | |||
}} | }} | ||
}} | }} | ||