Module:HTMLParse: Difference between revisions

2 bytes added ,  18:06, 20 August 2019
m
no edit summary
mNo edit summary
mNo edit summary
Line 2: Line 2:


function p.pluralize(frame)
function p.pluralize(frame)
     local htmlString = frame.args[1]
     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