summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mkiv/typo-cln.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/typo-cln.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-cln.lua12
1 files changed, 8 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-cln.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-cln.lua
index b9b0e7d6cb7..b7187eaeb0b 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-cln.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-cln.lua
@@ -31,13 +31,15 @@ local enableaction = nodes.tasks.enableaction
local texsetattribute = tex.setattribute
local nuts = nodes.nuts
+local tonut = nuts.tonut
+local getchar = nuts.getchar
local getattr = nuts.getattr
local setattr = nuts.setattr
local setchar = nuts.setchar
-local nextglyph = nuts.traversers.glyph
+local traverse_id = nuts.traverse_id
local unsetvalue = attributes.unsetvalue
@@ -56,8 +58,9 @@ local resetter = { -- this will become an entry in char-def
-- cleaning comes first.
function cleaners.handler(head)
- local inline = false
- for n, char, font in nextglyph, head do
+ local inline, done = false, false
+ for n in traverse_id(glyph_code,tonut(head)) do
+ local char = getchar(n)
if resetter[char] then
inline = false
elseif not inline then
@@ -68,6 +71,7 @@ function cleaners.handler(head)
-- some day, not much change that \SS ends up here
else
setchar(n,upper)
+ done = true
if trace_autocase then
report_autocase("")
end
@@ -76,7 +80,7 @@ function cleaners.handler(head)
inline = true
end
end
- return head
+ return head, done
end
-- see typo-cap for a more advanced settings handler .. not needed now