diff options
Diffstat (limited to 'tex/context/base/x-mathml.lua')
-rw-r--r-- | tex/context/base/x-mathml.lua | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/tex/context/base/x-mathml.lua b/tex/context/base/x-mathml.lua index 30e770190..bf4cae43f 100644 --- a/tex/context/base/x-mathml.lua +++ b/tex/context/base/x-mathml.lua @@ -12,7 +12,7 @@ local type, next = type, next local utf = unicode.utf8 local format, lower, find, gsub = string.format, string.lower, string.find, string.gsub local strip = string.strip -local utfchar, utffind, utfgmatch, utfgsub = utf.char, utf.find, utf.gmatch, utf.gsub +local utfchar, utfgsub = utf.char, utf.gsub local xmlsprint, xmlcprint, xmltext, xmlcontent = xml.sprint, xml.cprint, xml.text, xml.content local getid = lxml.getid local utfcharacters, utfvalues = string.utfcharacters, string.utfvalues @@ -524,10 +524,7 @@ function mathml.mfenced(id) -- multiple separators elseif n == 1 then xmlsprint(collected[1]) -- to be checked else - local t = { } - for s in utfgmatch(separators,"[^%s]") do - t[#t+1] = s - end + local t = utf.split(separators,true) for i=1,n do xmlsprint(collected[i]) -- to be checked if i < n then @@ -646,8 +643,8 @@ function mathml.mcolumn(root) local tag = e.tg if tag == "mi" or tag == "mn" or tag == "mo" or tag == "mtext" then local str = xmltext(e) -str = gsub(str,"&.-;","") - for s in utfcharacters(str) do -- utf.gmatch(str,".") btw, the gmatch was bugged + str = gsub(str,"&.-;","") + for s in utfcharacters(str) do m[#m+1] = { tag, s } end if tag == "mn" then @@ -658,7 +655,7 @@ str = gsub(str,"&.-;","") end elseif tag == "mspace" or tag == "mline" then local str = e.at.spacing or "" - for s in utfcharacters(str) do -- utf.gmatch(str,".") btw, the gmatch was bugged + for s in utfcharacters(str) do m[#m+1] = { tag, s } end -- elseif tag == "mline" then |