Module:HTMLParse: Difference between revisions

16 bytes added ,  02:06, 1 September 2019
m
account for pluralizations ending in 's'
(add make_possessive)
m (account for pluralizations ending in 's')
Line 11: Line 11:
         return htmlString  --return unmodified string (couldn't find alpha character followed by closing HTML tag)
         return htmlString  --return unmodified string (couldn't find alpha character followed by closing HTML tag)
     elseif (string.sub(prefix, -1) == 's') then
     elseif (string.sub(prefix, -1) == 's') then
         return htmlString  --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')
     else
     else
         return (prefix .. apostrophe .. 's' .. postfix)
         return (prefix .. apostrophe .. 's' .. postfix)