diff options
author | Marius <mariausol@gmail.com> | 2013-03-05 18:00:17 +0200 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2013-03-05 18:00:17 +0200 |
commit | a51f6cf6ee087046a2ae5927ed4edff0a1acec1b (patch) | |
tree | a57b34df3ba55e79713ebc52d5cfd3c42dee2c2f /tex/context/base/typo-cap.lua | |
parent | 9798ccd13ea7e74f5fd25c5975fbc8d3048ced9d (diff) | |
download | context-a51f6cf6ee087046a2ae5927ed4edff0a1acec1b.tar.gz |
beta 2013.03.05 16:40
Diffstat (limited to 'tex/context/base/typo-cap.lua')
-rw-r--r-- | tex/context/base/typo-cap.lua | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/tex/context/base/typo-cap.lua b/tex/context/base/typo-cap.lua index 3233a6ba2..0b9e52749 100644 --- a/tex/context/base/typo-cap.lua +++ b/tex/context/base/typo-cap.lua @@ -16,9 +16,6 @@ local report_casing = logs.reporter("typesetting","casing") local nodes, node = nodes, node -local has_attribute = node.has_attribute -local unset_attribute = node.unset_attribute -local set_attribute = node.set_attribute local traverse_id = node.traverse_id local copy_node = node.copy @@ -171,8 +168,8 @@ local function Word(start,attribute,attr) if not prev or prev.id ~= glyph_code then --- only the first character is treated for n in traverse_id(glyph_code,start.next) do - if has_attribute(n,attribute) == attr then - unset_attribute(n,attribute) + if n[attribute] == attr then + n[attribute] = unsetvalue else -- break -- we can have nested mess end @@ -264,13 +261,13 @@ local function process(namespace,attribute,head) -- not real fast but also not u while start do -- while because start can jump ahead local id = start.id if id == glyph_code then - local attr = has_attribute(start,attribute) + local attr = start[attribute] if attr and attr > 0 then if attr ~= lastattr then lastfont = nil lastattr = attr end - unset_attribute(start,attribute) + start[attribute] = unsetvalue local action = actions[attr%100] -- map back to low number if action then start, ok = action(start,attribute,attr) |