FA-80772 / Bidirectional text layout / Member archive
Isolating run sequences: chained sequence end · case 02
eos of an isolate-spanning sequence is taken from the middle of the text.
Case contract
Input [classes, levels, paragraph level]. Split into maximal level runs; chain a run ending in a matched isolate initiator (LRI/RLI/FSI) with the run starting at its matching PDI (stack matching; unmatched PDI ignored). For each sequence sos = parity of max(level of first char, level of preceding char or paragraph level); eos = parity of max(level of last char, level of following char or paragraph level), using the paragraph level when the last char is an isolate initiator. Return [[indices, sos, eos]].
Why this case matters
Mixed right-to-left and left-to-right text must resolve levels and visual order exactly, or words, numbers and carets land in the wrong place.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: chained sequence end | [[[0, 1, 2, 5, 6, 7, 8], "R", "R"], [[3, 4], "R", "R"], [[9], "L", "L"], [[10, 11, 12], "L", "R"]] | [[[0, 1, 2, 5, 6, 7, 8], "R", "L"], [[3, 4], "R", "R"], [[9], "L", "L"], [[10, 11, 12], "L", "R"]] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗