This is a bug that originates in swash. Essentially, the Unicode line breaking algorithm generates mandatory breaks after the newline sequence so we don’t capture the final empty line at all because we don’t have a cluster where we can attach the state. I have a “fix” for this in the upcoming code that just uses the cluster’s whitespace property to detect newlines and ignores the results of the LBA entirely for these. This actually simplifies the code a bit and removes the nasty “skip mandatory break” logic.
This is a bug that originates in swash. Essentially, the Unicode line breaking algorithm generates mandatory breaks after the newline sequence so we don’t capture the final empty line at all because we don’t have a cluster where we can attach the state. I have a “fix” for this in the upcoming code that just uses the cluster’s whitespace property to detect newlines and ignores the results of the LBA entirely for these. This actually simplifies the code a bit and removes the nasty “skip mandatory break” logic.