Module:HTMLParse: Difference between revisions

33 bytes removed ,  01:17, 5 January 2021
m
no edit summary
(it actually works now)
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 21: Line 21:


function p.capitalize(frame)
function p.capitalize(frame)
--local htmlString = frame.args.html
local htmlString = frame.args.html
     --if string.find(htmlString, "{") then
     if string.find(htmlString, "{") then
      --  htmlString = frame:preprocess(htmlString)  --expand any templates that may have been passed to this module
        htmlString = frame:preprocess(htmlString)  --expand any templates that may have been passed to this module
     --end
     end
     htmlString = frame
     --split string at the first alphabetic character that appears immediately after a starting html tag <...>
      --split string at the first alphabetic character that appears immediately after a starting html tag <...>
     prefix = htmlString:match'([^/]*>)' or ''
     prefix = htmlString:match'([^/]*>)' or ''
     if (prefix == nil or prefix == '') then
     if (prefix == nil or prefix == '') then