FA-80359 / Bidirectional text layout / Member archive
First-strong paragraph direction: numbers as strong · case 04
Paragraphs that start with a number become left-to-right.
Case contract
Input [bidi classes, default level]. Scan for the first L (level 0) or R/AL (level 1), skipping characters between an isolate initiator (LRI, RLI, FSI) and its matching PDI (nesting counted; an unmatched PDI is ignored). Embedding codes are not skipped. Return [level, index of deciding character] or [default, None].
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: numbers as strong | [0, 0] | [1, 2] | 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 ↗