summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/x-chemml.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/x-chemml.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/x-chemml.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/context/base/x-chemml.lua b/Master/texmf-dist/tex/context/base/x-chemml.lua
index 387935c8ba5..79c1d9525ce 100644
--- a/Master/texmf-dist/tex/context/base/x-chemml.lua
+++ b/Master/texmf-dist/tex/context/base/x-chemml.lua
@@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['x-chemml'] = {
-- not yet acceptable cld
-local format, lower, upper, gsub, sub = string.format, string.lower, string.upper, string.gsub, string.sub
+local format, lower, upper, gsub, sub, match = string.format, string.lower, string.upper, string.gsub, string.sub, string.match
local concat = table.concat
local chemml = { }
@@ -17,7 +17,7 @@ moduledata.chemml = chemml
function chemml.pi(id)
local str = xml.content(lxml.id(id))
- local _, class, key, value = str:match("^(%S+)%s+(%S+)%s+(%S+)%s+(%S+)%s*$")
+ local _, class, key, value = match(str,"^(%S+)%s+(%S+)%s+(%S+)%s+(%S+)%s*$")
if key and value then
context("\\setupCMLappearance[%s][%s=%s]",class, key, value)
end
@@ -28,7 +28,7 @@ function chemml.do_graphic(id)
for r, d, k in xml.elements(lxml.id(id),"cml:graphic") do
t[#t+1] = xml.tostring(d[k].dt)
end
- concat(concat(t,","))
+ context(concat(t,","))
end
function chemml.no_graphic(id)