More actions
m Protected "Template:0": important template ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)) |
explaining this thing |
||
Line 3: | Line 3: | ||
Helps clean up errant spaces after piping a link to remove anything ensconced in parentheses, e.g. "[[Pegasus (episode)]]." It is used in such templates as: [[Template:TRS]], [[Template:TOS]], [[Template:ComicLine]], and the like. | Helps clean up errant spaces after piping a link to remove anything ensconced in parentheses, e.g. "[[Pegasus (episode)]]." It is used in such templates as: [[Template:TRS]], [[Template:TOS]], [[Template:ComicLine]], and the like. | ||
== What this fixes == | |||
If using the regular "explode" expression to remove the parenthetical, e.g. "Pegasus (episode)", you'll get "Pegasus ", leaving an unsightly space between "Pegasus" and the end quotation mark. | |||
Example: | |||
<code><nowiki>{{#explode:Pegasus (episode)|(|0}}, is an episode of the [[Re-imagined Series]].</nowiki></code> | |||
<code>Would print:</code> {{#explode:Pegasus (episode)|(|0}}, is an episode of the [[Re-imagined Series]]. | |||
To fix the above example, one would then use this template thusly: | |||
<code><nowiki>{{0|Pegasus (episode)}}, is an episode of the [[Re-imagined Series]].</nowiki></code> | |||
<code>Would print:</code> {{0|Pegasus (episode)}}, is an episode of the [[Re-imagined Series]]. | |||
</noinclude> | </noinclude> |
Revision as of 22:49, 2 May 2020
Documentation
Helps clean up errant spaces after piping a link to remove anything ensconced in parentheses, e.g. "Pegasus (episode)." It is used in such templates as: Template:TRS, Template:TOS, Template:ComicLine, and the like.
What this fixes
If using the regular "explode" expression to remove the parenthetical, e.g. "Pegasus (episode)", you'll get "Pegasus ", leaving an unsightly space between "Pegasus" and the end quotation mark.
Example:
{{#explode:Pegasus (episode)|(|0}}, is an episode of the [[Re-imagined Series]].
Would print:
Pegasus , is an episode of the Re-imagined Series.
To fix the above example, one would then use this template thusly:
{{0|Pegasus (episode)}}, is an episode of the [[Re-imagined Series]].
Would print:
Pegasus, is an episode of the Re-imagined Series.