Paweł Jackowski wrote:
Taco Hoekwater wrote:
Paweł Jackowski wrote:
someglyph.next = someother discretionary.pre = someglyph
is not the same. Why?
Hans:
indeed strange ... a quick hack is to use node.copy on b
Copying the node works in that case, thanks.
Taco:
Because a discretionary's pre, post, and replace lists are a bit special: internally the discretionary does not just have a next and a prev link for each of the head nodes, but also a 'tail' link. That last one points to the last node in the list for each of the three fields. That extra link is used during hyphenation and at end-of-line situations (those parts of the code would be much more complex == slower without it).
Agh, having the disc.tail link(s) at lua level would simplify processing discretionaries a lot! Why you decided not to interface tails?
Because having them would be even more confusing than not having them. At least, that was Nanning and my feeling about it.