mirror of
https://github.com/openharmony/third_party_rust_unicode-bidi.git
synced 2026-06-30 21:27:57 -04:00
6427532127
To be able to implement L1, we need access to more information from `BidiInfo`, namely `original_classes` of the `text`, in `visual_runs()`, which would mean it should pass through `reorder_line()`. The fact that information from `BidiInfo` is needed for both steps of the public API (generating `BidiInfo` and consuming it per-paragraph/per-level) made me change the API design and move these methods into `impl BidiInfo`. Then, since we needed access to `text` for every `BidiInfo` consumption, I added a reference to `text` to `BidiInfo`, which also enables more compile-time checks for `BidiInfo` isntance not outliving the text in the user code. NOTE: We are already breaking API in version 0.3.0 and paving for full spec support is a good reason to do so, IMHO. The L1 rule works by one pass on the text of the line. Conformance Test: this implementation reduces the number of failures from 60494 to 23770 (out of total 256747 cases). Fix #2
5 lines
121 B
Plaintext
5 lines
121 B
Plaintext
This software was written by the following people:
|
|
|
|
Matt Brubeck <mbrubeck@limpet.net>
|
|
Behnam Esfahbod <behnam@zwnj.org>
|