FAILURE MAP
← Case archive

FA-80827 / Bidirectional text layout / Member archive

Paragraph separation and direction: trailing empty paragraph · case 02

Text ending with a separator gains a phantom empty paragraph.

Member previewVariant 2 · 3 implementations · 8 checks per implementation

Case contract

Input [text, default level]. Paragraph separators (\n, \r, U+2029; \r\n counts once) end a paragraph and stay with it. A trailing non-empty remainder is a paragraph. Each paragraph takes level 1 if its first letter is uppercase (stand-in for RTL), 0 if lowercase, else the default. Return [[paragraph, level]].

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 fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression: trailing empty paragraph[["XY\r", 1], [" \r\n", 0], ["", 0]][["XY\r", 1], [" \r\n", 0]]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 ↗