summaryrefslogtreecommitdiff
path: root/tex/context/base/node-acc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/node-acc.lua')
-rw-r--r--tex/context/base/node-acc.lua12
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')