diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2014-05-17 03:15:13 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2014-05-17 03:15:13 +0200 |
commit | 7efbfd1d82c215c154a4840a906e0aa55e07ed0e (patch) | |
tree | e3b2eb3cb73a209713900231290208a40979d00e /tex/context/base/node-acc.lua | |
parent | d14466a41dfef73ca9c32c5ef8e266a30a0ac03f (diff) | |
download | context-7efbfd1d82c215c154a4840a906e0aa55e07ed0e.tar.gz |
2014-05-16 20:10:00
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') |