diff options
author | Hans Hagen <pragma@wxs.nl> | 2014-05-16 20:08:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2014-05-16 20:08:00 +0200 |
commit | dcafc5c897cc956f197a54f516472954036af7f9 (patch) | |
tree | c54e512e741b947d8f3a13e91b76402484c55ef1 /tex/context/base/node-acc.lua | |
parent | c3675f9b2c0dd9c6ae6b911593f5331dba5992a5 (diff) | |
download | context-dcafc5c897cc956f197a54f516472954036af7f9.tar.gz |
beta 2014.05.16 20:08
Diffstat (limited to 'tex/context/base/node-acc.lua')
-rw-r--r-- | tex/context/base/node-acc.lua | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tex/context/base/node-acc.lua b/tex/context/base/node-acc.lua index 59fa031bf..e684aeb7b 100644 --- a/tex/context/base/node-acc.lua +++ b/tex/context/base/node-acc.lua @@ -31,7 +31,7 @@ local copy_node = nuts.copy local free_nodelist = nuts.flush_list local insert_after = nuts.insert_after -local new_gluespec = nuts.pool.gluespec -- temp hack +local new_gluespec = nuts.pool.gluespec -- temp hack local glue_code = nodecodes.glue local kern_code = nodecodes.kern @@ -41,7 +41,8 @@ local vlist_code = nodecodes.vlist local a_characters = attributes.private("characters") -local threshold = 65536 +local threshold = 65536 -- not used +local nofreplaced = 0 -- todo: nbsp etc -- todo: collapse kerns @@ -83,6 +84,7 @@ local function injectspaces(head) end setattr(s,a_characters,0) setattr(n,a_characters,0) + nofreplaced = nofreplaced + 1 end -- end elseif id == hlist_code or id == vlist_code then @@ -113,6 +115,12 @@ nodes.handlers.accessibility = function(head) return tonode(head), done end +statistics.register("inserted spaces in output",function() + if nofreplaced > 0 then + return nofreplaced + end +end) + -- todo: -- local a_hyphenated = attributes.private('hyphenated') |