Module:HTMLParse: Difference between revisions

No change in size ,  19:44, 1 September 2019
m
no edit summary
(if word end in 'y', make it end in 'ies' unless possessive)
mNo edit summary
Line 13: Line 13:
         return (htmlString .. apostrophe)  --return unmodified (ends with 's', like 'boots', so we shouldn't append another 's')
         return (htmlString .. apostrophe)  --return unmodified (ends with 's', like 'boots', so we shouldn't append another 's')
     elseif (string.sub(prefix, -1) == 'y') and apostrophe == '' then
     elseif (string.sub(prefix, -1) == 'y') and apostrophe == '' then
         return (string.sub(prefix, 1, -1) ..  'ies' .. postfix)
         return (string.sub(prefix, 1, -2) ..  'ies' .. postfix)
     else
     else
         return (prefix .. apostrophe .. 's' .. postfix)
         return (prefix .. apostrophe .. 's' .. postfix)