Template:ExternalLinkToText: Difference between revisions
Jump to navigation
Jump to search
(Created page with "* {{#pos:[https://github.com/mozilla/balrog-ui https://github.com/mozilla/balrog-ui]|[}} * {{#pos:[https://github.com/mozilla/balrog-ui https://github.com/mozilla/balrog-ui]|]...") |
No edit summary |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<!--First Check if first char is a link char | <!--First Check if first char is a link char | ||
-->{{#ifeq: {{#pos: | -->{{#ifeq: {{#pos:{{{1}}}|[}}|0|<!-- | ||
-Then Check if the last char is a link char- | -Then Check if the last char is a link char- | ||
-->{{#ifeq: {{#pos: | -->{{#ifeq: {{#pos:{{{1}}}|]}}|{{#expr: {{#len:{{{1}}}}}-1}}|<!-- | ||
-Yay We're a link- | -Yay We're a link- | ||
--> | -Now to do the actual trimming of the fat | ||
-->{{#sub:{{{1}}}|1|{{#pos:{{{1}}}|<nowiki> </nowiki>}}}}|<!-- | |||
-In the "Not A Link" cases just return orig string- | |||
-->{{{1}}}}}|{{{1}}}}} | |||
Latest revision as of 07:05, 2 January 2015
{{{1}}}