I wrote:

Implementation of hyphenation-ladder-count.

Just a couple of annotations:

- this implementation does not store any extra information inside the nodes: the algorithm checks wheter a break is ok or not using a for loop; if you prefer, I could change this so that the number of consecutive lines ending with a hyphen is stored inside the nodes, and the check takes a constant time

- the specs states that this property "Specifies a limit on the number of successive hyphenated line-areas the formatter may generate *in a block-area*"; so, if the value is 2 and a block creates 5 lines, the first 4 lines could all end with a hyphen provided there is a break after the second one. This implementation would not create such a set of lines: anyway, the produced output still satisfies the condition; in other words, we check a more strict condition.

Regards
    Luca

Reply via email to