Difference between revisions of "Template:SmartLink/Link"

From Wikispooks
Jump to navigation Jump to search
(Replace #substring:)
 
Line 1: Line 1:
 
<noinclude>[[Category:String manipulation templates]]This is used by [[Template:SmartLink]], as is [[Template:SmartLink/Anchor]]. It is 'smart', in that it does the following operation:<br/>
 
<noinclude>[[Category:String manipulation templates]]This is used by [[Template:SmartLink]], as is [[Template:SmartLink/Anchor]]. It is 'smart', in that it does the following operation:<br/>
 
* It removes a trailing punctuation character ('.', ';' or '?') from the pagename (e.g. to allow people to end links in "?" to indicate uncertainty)
 
* It removes a trailing punctuation character ('.', ';' or '?') from the pagename (e.g. to allow people to end links in "?" to indicate uncertainty)
</noinclude><includeonly>{{#switch: {{#substring:{{{1|}}}|-1}}
+
</noinclude><includeonly>{{#switch: {{#sub:{{{1|}}}|-1}}
 
|=
 
|=
 
|?
 
|?

Latest revision as of 06:07, 6 July 2019

This is used by Template:SmartLink, as is Template:SmartLink/Anchor. It is 'smart', in that it does the following operation:

  • It removes a trailing punctuation character ('.', ';' or '?') from the pagename (e.g. to allow people to end links in "?" to indicate uncertainty)