diff options
author | Philipp Gesang <gesang@stud.uni-heidelberg.de> | 2012-06-25 11:16:26 +0200 |
---|---|---|
committer | Philipp Gesang <gesang@stud.uni-heidelberg.de> | 2012-06-25 11:16:26 +0200 |
commit | 584a49ffdbbf96151938536d2961261223ea9281 (patch) | |
tree | ee91b777b7ca9a80da990a71d0b1f4bc53da0021 /tex/context/third | |
parent | e7c981e0bb3e33871bcd85d2cf5b90b3529465fc (diff) | |
download | enigma-584a49ffdbbf96151938536d2961261223ea9281.tar.gz |
[cbk] fix block-o-five grouping
Diffstat (limited to 'tex/context/third')
-rw-r--r-- | tex/context/third/enigma/enigma.lua | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/tex/context/third/enigma/enigma.lua b/tex/context/third/enigma/enigma.lua index 48d1134..2dcf310 100644 --- a/tex/context/third/enigma/enigma.lua +++ b/tex/context/third/enigma/enigma.lua @@ -652,7 +652,7 @@ solution is to write out numbers above ten. ["2"] = "zwei", ["3"] = "drei", ["4"] = "vier", - ["5"] = "fünf", + ["5"] = "fuenf", ["6"] = "sechs", ["7"] = "sieben", ["8"] = "acht", @@ -1423,20 +1423,18 @@ local new_callback = function (machine, name) if machine.spacing then -- auto-group output insert_encoded = function (head, n, replacement) local insertion = nodecopy(n) - local current_node = insertion -- needed for multi replacements if replacement then -- inefficient but bulletproof insertion.char = utf8byte(replacement) --print(utf8char(n.char), "=>", utf8char(insertion.char)) end nodeinsert_before(head, n, insertion) mod_5 = mod_5 + 1 - if mod_5 >= 5 then - mod_5 = 0 - current_node = nodecopy(space_node) - nodeinsert_after(head, insertion, nodecopy(current_node)) + if mod_5 > 5 then + mod_5 = 1 + nodeinsert_before(head, insertion, nodecopy(space_node)) end noderemove(head, n) - return current_node -- so we know where to insert + return insertion -- so we know where to insert end else insert_encoded = function (head, n, replacement) |