Difference between revisions of "Template:Short description/lowercasecheck"

From "PTTLink Wiki"
Jump to navigation Jump to search
m (1 revision imported)
Mediawiki>GKFX
(Update from sandbox; no longer ASCII-specific)
Line 1: Line 1:
{{#ifeq:<!--test first character for lower-case letter-->{{#invoke:string|find|{{Str left|{{{1|}}}|1}}|[a-z]|plain=false}}|1
+
{{#ifeq:<!--test first character for lower-case letter-->{{#invoke:string|find|1={{{1|}}}|2=^%l|plain=false}}|1
 
|<!-- first character is a lower case letter; test against whitelist
 
|<!-- first character is a lower case letter; test against whitelist
 
-->{{#switch: {{First word|{{{1|}}}}}<!--begin whitelist-->
 
-->{{#switch: {{First word|{{{1|}}}}}<!--begin whitelist-->

Revision as of 23:12, 21 January 2022

Template documentationview · edit · history · purge ]


This template is intended for use inside {{Short description}}. It checks to see if the short description starts with a lower-case letter. If it does, then it checks the first word against a whitelist of permitted lower-case words like "c.", "iMac", and "none". If the first word is not on the whitelist, Category:Pages with lower-case short description is applied to the page on which the lower-case short description exists.

Usage

This template should not be used directly in articles. It should be transcluded only in {{Short description}}.