Template:Detect singular/sandbox

From blackwiki
< Template:Detect singular
Revision as of 20:50, 18 November 2018 by imported>Hike395 (simplify template to just return 1 if singular or nil otherwise)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

1

Template documentation[view] [edit] [history] [purge]

Usage

Used to detect possible lists. Useful for infoboxes, where the label may be singular (e.g., "Nickname:") but the data may be a list. One required parameter (the string to search for a list). Returns 1 if not a list, nil if a possible list.

Examples:

{{Detect singular|Mack the Knife}} → 1

{{Detect singular|Mack the Knife, Joe}} →

{{Detect singular|{{hlist|first|second|third}}}} →

It is not foolproof, however:

{{Detect singular|[[Charles, Prince of Wales]]}} →

{{Detect singular|[[Dave Nellist]]}} →