servo / unicode-bidi

Implementation of the Unicode Bidirection Algorithm in Rust
Other
74 stars 34 forks source link

Implement N0 (bracket matching) #85

Closed Manishearth closed 1 year ago

Manishearth commented 1 year ago

Fixes #3

This was a bit tricky to pin down in the details because of some stuff which I plan to file an issue about.

This does require new data, but it isn't a breaking change in the non-hardcoded-data mode because the added trait method falls back to the relatively small amount of hardcoded bidi pair data.

There's a bunch of complicated comments about processed_class iteration, related to https://github.com/servo/unicode-bidi/issues/86. They're not quite accurate now that I have done the analysis in #86, but they're still potentially relevant.

This can be reviewed commit by commit.

r? @eggrobin or @sffc or @mbrubeck

Manishearth commented 1 year ago

I think as far as review is concerned I will be satisfied with one review (from @eggrobin or otherwise) on the algorithm, and also I'd like @sffc or @echeran to look at the data model. Also fine with landing this with algorithm review and an understanding that we won't cut a release until someone has had a look at the data model.

Mostly because this PR is getting big and I already have another PR built on in (#91) plus a complicated fix (#92) that I don't want to keep rebasing.