Skip to content

Fixes ligature transposition bug #1617 - #1621

Merged
ahrm merged 1 commit into
ahrm:developmentfrom
aw-cloud:bugfix_ligature_parse_order
Jun 1, 2026
Merged

Fixes ligature transposition bug #1617#1621
ahrm merged 1 commit into
ahrm:developmentfrom
aw-cloud:bugfix_ligature_parse_order

Conversation

@aw-cloud

@aw-cloud aw-cloud commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Hi ahrm,

I found the culprit for #1617. It's basically identical to 627c3ef. The reorder_stext_line utility function used an unstable sort which I'm guessing is why you couldn't reproduce the issue.

As an aside, it might be worth adding a comment to the reordering function. It looks a bit odd (redundant) at first to do the reordering in both cases. I think it was added in 5016bc5 as part of handling malformed text.

reorder_stext_line(...) used an unstable sort which resulted in ligature elements and following characters getting transposed. Using a stable sort instead fixes the issue.
@ahrm
ahrm merged commit fa4cd23 into ahrm:development Jun 1, 2026
4 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants