Skip to content

Return empty bracket pair list on BD16 stack overflow - #155

Merged
Manishearth merged 3 commits into
servo:mainfrom
Manishearth:fix-bd16-bracket-overflow
Sep 15, 2026
Merged

Manishearth merged 3 commits into
servo:mainfrom
Manishearth:fix-bd16-bracket-overflow

Conversation

@Manishearth

Copy link
Copy Markdown
Member

https://www.unicode.org/reports/tr9/#BD16

We weren't doing it correctly.

@roozbehp

Copy link
Copy Markdown

My only suggestion is an additional regression test:

Paragraph level: 1
Input: "a" + "(" ×64 + LRI + "x" + PDI + "b)"

The final ) must receive level 1. Adding this case would specifically protect the return behavior; this PR’s existing test checks discarding earlier pairs but would also pass with clear(); break;.

@roozbehp roozbehp left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Manishearth
Manishearth merged commit 9a8c7b0 into servo:main Sep 15, 2026
7 checks passed
@Manishearth
Manishearth deleted the fix-bd16-bracket-overflow branch September 15, 2026 18:52
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