Bots, Editors (Semantic MediaWiki), trusted
9,959
edits
mNo edit summary |
(Add nospaces() helper, used to build compact short names for category names) |
||
| Line 74: | Line 74: | ||
-- return point_at_end(result) | -- return point_at_end(result) | ||
return result | return result | ||
end | |||
------------------------------------------------- | |||
-- Remove whitespace from a short piece of text (e.g. initials), to build | |||
-- a compact variant of a person's short name for category names. | |||
-- Used in : Template:CTD article | |||
-- Call example: | |||
-- {{#invoke: CTD | nospaces | {{{initials|}}} }} | |||
function ctd.nospaces( frame ) | |||
local text = frame.args[1] or '' | |||
return ( mw.ustring.gsub( text, '%s+', '' ) ) | |||
end | end | ||
return ctd | return ctd | ||