diff options
author | Hans Hagen <pragma@wxs.nl> | 2018-09-02 00:04:51 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2018-09-02 00:04:51 +0200 |
commit | fd9c4ecd4421d087de21bef1e53d8ffb016285b0 (patch) | |
tree | 64606204adcabe2f197984ca8d063891b770bace /tex/context/base/mkiv/spac-chr.lua | |
parent | 2106beefbc854f77a92264c815d3cf2b3460f0b6 (diff) | |
download | context-fd9c4ecd4421d087de21bef1e53d8ffb016285b0.tar.gz |
2018-09-01 23:20:00
Diffstat (limited to 'tex/context/base/mkiv/spac-chr.lua')
-rw-r--r-- | tex/context/base/mkiv/spac-chr.lua | 59 |
1 files changed, 3 insertions, 56 deletions
diff --git a/tex/context/base/mkiv/spac-chr.lua b/tex/context/base/mkiv/spac-chr.lua index 98b07adf5..d666956e5 100644 --- a/tex/context/base/mkiv/spac-chr.lua +++ b/tex/context/base/mkiv/spac-chr.lua @@ -151,8 +151,8 @@ end function characters.replacenbspaces(head) local wipe = false - for current in nextglyph, head do -- can be anytime so no traverse_char - if getchar(current) == 0x00A0 then + for current, font, char in nextglyph, head do -- can be anytime so no traverse_char + if char == 0x00A0 then if wipe then head = remove_node(h,current,true) wipe = false @@ -169,30 +169,6 @@ function characters.replacenbspaces(head) return head end -if LUATEXVERSION >= 1.080 then - - function characters.replacenbspaces(head) - local wipe = false - for current, font, char in nextglyph, head do -- can be anytime so no traverse_char - if char == 0x00A0 then - if wipe then - head = remove_node(h,current,true) - wipe = false - end - local h = nbsp(head,current) - if h then - wipe = current - end - end - end - if wipe then - head = remove_node(head,current,true) - end - return head - end - -end - -- This initialization might move someplace else if we need more of it. The problem is that -- this module depends on fonts so we have an order problem. @@ -353,8 +329,7 @@ characters.methods = methods function characters.handler(head) local wipe = false - for current in nextchar, head do - local char = getchar(current) + for current, char in nextchar, head do local method = methods[char] if method then if wipe then @@ -375,31 +350,3 @@ function characters.handler(head) end return head end - -if LUATEXVERSION >= 1.080 then - - function characters.handler(head) - local wipe = false - for current, char in nextchar, head do - local method = methods[char] - if method then - if wipe then - head = remove_node(head,wipe,true) - wipe = false - end - if trace_characters then - report_characters("replacing character %C, description %a",char,lower(chardata[char].description)) - end - local h = method(head,current) - if h then - wipe = current - end - end - end - if wipe then - head = remove_node(head,wipe,true) - end - return head - end - -end |