8,290
edits
mNo edit summary |
mNo edit summary |
||
Line 2: | Line 2: | ||
function p.pluralize(frame) | function p.pluralize(frame) | ||
local htmlString = frame.args | local htmlString = frame.args.html | ||
prefix, postfix = htmlString:match'(.*%a)(</.*)' --split string at the last alphabetic character that appears immediately before a closing html tag </...> | prefix, postfix = htmlString:match'(.*%a)(</.*)' --split string at the last alphabetic character that appears immediately before a closing html tag </...> | ||
if (prefix == nil or prefix == '' or postfix == nil or postfix == '') then | if (prefix == nil or prefix == '' or postfix == nil or postfix == '') then |