Template:Reference page/superscript: Difference between revisions
From Tardis Wiki, the free Doctor Who reference
(further improve visual appearance) |
(commented out one String.replace reducing normal spaces to thinspaces in the visible superscript because it breaks some testcases) |
||
Line 1: | Line 1: | ||
<!-- Only for internal use: |wrap=n[o]/y[es]/f[orced] |leadin=value |prefix=value |pp=value |where=value |sup-where=value |quote-where=value |quote=value |language=value |translation=value |suffix=value -->{{#if:{{{where|}}}|<sup class="reference {{#switch:{{{wrap|}}}|f|forced=|no}}wrap">{{{prefix|}}}<span title="<!--{{#invoke:String|replace|{{#invoke:String|replace|{{#invoke:String|replace|-->{{#invoke:DecodeEncode|encode|s={{#invoke:Plain text|main|1={{{leadin|}}}: {{#if:{{{quote-where|}}}|{{{quote-where|}}}|{{{where|}}}}}|encode=false}}|charset=<>"}}<!--|"|"}}|<|>}}|>|<}}-->{{#if:{{{quote|}}}| Quotation<!--{{#invoke:String|replace|{{#invoke:String|replace|{{#invoke:String|replace|-->{{#invoke:DecodeEncode|encode|s={{#invoke:Plain text|main|1={{#if:{{{language|}}}| ({{{language|}}})}}: "{{trim quotes|s={{{quote|}}}}}"{{#if:{{{translation|}}}| Translation: "{{trim quotes|s={{{translation}}}}}"}}|encode=false}}|charset=<>"}}<!--|"|"}}|<|>}}|>|<}}-->" class="tooltip tooltip-dashed" style="border-bottom: 1px dashed;}}">{{#invoke:String|replace|{{{pp|}}}{{#if:{{{sup-where|}}}|{{{sup-where|}}}|{{{where|}}}}}| | }}</span>{{{suffix|}}}</sup>}}<noinclude> | <!-- Only for internal use: |wrap=n[o]/y[es]/f[orced] |leadin=value |prefix=value |pp=value |where=value |sup-where=value |quote-where=value |quote=value |language=value |translation=value |suffix=value -->{{#if:{{{where|}}}|<sup class="reference {{#switch:{{{wrap|}}}|f|forced=|no}}wrap">{{{prefix|}}}<span title="<!--{{#invoke:String|replace|{{#invoke:String|replace|{{#invoke:String|replace|-->{{#invoke:DecodeEncode|encode|s={{#invoke:Plain text|main|1={{{leadin|}}}: {{#if:{{{quote-where|}}}|{{{quote-where|}}}|{{{where|}}}}}|encode=false}}|charset=<>"}}<!--|"|"}}|<|>}}|>|<}}-->{{#if:{{{quote|}}}| Quotation<!--{{#invoke:String|replace|{{#invoke:String|replace|{{#invoke:String|replace|-->{{#invoke:DecodeEncode|encode|s={{#invoke:Plain text|main|1={{#if:{{{language|}}}| ({{{language|}}})}}: "{{trim quotes|s={{{quote|}}}}}"{{#if:{{{translation|}}}| Translation: "{{trim quotes|s={{{translation}}}}}"}}|encode=false}}|charset=<>"}}<!--|"|"}}|<|>}}|>|<}}-->" class="tooltip tooltip-dashed" style="border-bottom: 1px dashed;}}"><!--DEBUG: This breaks plainlinks/stripmarkers/catlinks testcases {{#invoke:String|replace|-->{{{pp|}}}{{#if:{{{sup-where|}}}|{{{sup-where|}}}|{{{where|}}}}}<!--| | }}--></span>{{{suffix|}}}</sup>}}<noinclude> | ||
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> |
Revision as of 16:55, 15 September 2021
Instructions for {{Reference page/superscript}}
This is a subtemplate, implementing the wikipedia:superscript info piece of Template:Rp for a single ref name.
Usage
For internal use only:
|wrap=n[o]/y[es]/f[orced]
, |leadin=value
, |prefix=value
, |pp=value
, |where=value
, |sup-where=value
, |quote-where=value
, |quote=value
, |suffix=value
See also
- Module:DecodeEncode.encode()
- Module:Plain text.main()