diff options
author | Marius <mariausol@gmail.com> | 2012-07-19 14:20:14 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2012-07-19 14:20:14 +0300 |
commit | fbfbcf8f6c5be5c08ed47b9093c50728cbf69fa5 (patch) | |
tree | 5320d7c31c681a5334fdcf18f9f21b621e983da8 /tex/context/base/typo-brk.lua | |
parent | f012686d63082594f65005c5de0730f6fa3af7d0 (diff) | |
download | context-fbfbcf8f6c5be5c08ed47b9093c50728cbf69fa5.tar.gz |
beta 2012.07.19 12:56
Diffstat (limited to 'tex/context/base/typo-brk.lua')
-rw-r--r-- | tex/context/base/typo-brk.lua | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/tex/context/base/typo-brk.lua b/tex/context/base/typo-brk.lua index 14f0b8b47..726518a85 100644 --- a/tex/context/base/typo-brk.lua +++ b/tex/context/base/typo-brk.lua @@ -29,7 +29,8 @@ local free_node = node.free local insert_node_before = node.insert_before local insert_node_after = node.insert_after local remove_node = nodes.remove -- ! nodes -local link_nodes = nodes.link + +local tonodes = nodes.tonodes local texattribute = tex.attribute local unsetvalue = attributes.unsetvalue @@ -139,10 +140,18 @@ methods[5] = function(head,start,settings) -- x => p q r head, start, tmp = remove_node(head,start) head, start = insert_node_before(head,start,new_disc()) local attr = tmp.attr + local font = tmp.font start.attr = copy_nodelist(attr) -- todo: critical only - start.pre = link_nodes(settings.right,tmp,attr) - start.post = link_nodes(settings.left,tmp,attr) - start.replace = link_nodes(settings.middle,tmp,attr) + local left, right, middle = settings.left, settings.right, settings.middle + if left then + start.pre = tonodes(tostring(left),font,attr) -- was right + end + if right then + start.post = tonodes(tostring(right),font,attr) -- was left + end + if middle then + start.replace = tonodes(tostring(middle),font,attr) + end free_node(tmp) insert_break(head,start,10000,10000) end |