Template:ExternalLinkToText: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
 
Line 1: Line 1:
<!--First Check if first char is a link char
<!--First Check if first char is a link char
-->{{#ifeq: {{#pos:[https://github.com/mozilla/balrog-ui https://github.com/mozilla/balrog-ui]|[}}|0|<!--
-->{{#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:[https://github.com/mozilla/balrog-ui https://github.com/mozilla/balrog-ui]|]}}|{{#expr: {{#len:[https://github.com/mozilla/balrog-ui https://github.com/mozilla/balrog-ui]}}-1}}|<!--
-->{{#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
-Now to do the actual trimming of the fat
-->{{#sub:[https://github.com/mozilla/balrog-ui https://github.com/mozilla/balrog-ui---foo]|1|{{#pos:[https://github.com/mozilla/balrog-ui https://github.com/mozilla/balrog-ui---foo]|<nowiki> </nowiki>}}}}|Not-A-Link}}|Not-A-Link}}
-->{{#sub:{{{1}}}|1|{{#pos:{{{1}}}|<nowiki> </nowiki>}}}}|<!--
-In the "Not A Link" cases just return orig string-
-->{{{1}}}}}|{{{1}}}}}
Account confirmers, Anti-spam team, Confirmed users, Bureaucrats and Sysops emeriti
1,529

edits

Navigation menu