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