Template:ExternalLinkToText: Difference between revisions
Jump to navigation
Jump to search
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: | -->{{#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 | -Now to do the actual trimming of the fat | ||
-->{{#sub: | -->{{#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}}}