Fix result box wrap: word boundaries, keep long-token breaking (#135) #145

Merged
fen merged 1 commits from fix-135-result-wrap into dev 2026-09-10 04:09:14 +00:00
Collaborator

Fixes #135

  • RESULT box on /new used word-break: break-all (inline style on #result), splitting words mid-word ("firs"/"t.").
  • Changed to word-break: normal + overflow-wrap: break-word: words wrap whole; very long unbreakable tokens (long URLs/hashes) still break instead of overflowing.
  • codebody wrap behavior untouched (#130 wrap toggle unaffected).
  • go vet + go test pass.
  • Rendered proof (headless chromium, 420px viewport):
    • Empty-paste result box: "Write or paste something first." renders with no word split; computed style word-break=normal, overflow-wrap=break-word; per-word span check found no word spanning lines (splitWords=[]).
    • 190-char unbreakable URL in the result box wraps across 4 lines within the box, no horizontal overflow (scrollWidth == clientWidth).
    • Screenshots: /tmp/pal135_shot_result.png, /tmp/pal135_shot_long.png
Fixes #135 - RESULT box on /new used word-break: break-all (inline style on #result), splitting words mid-word ("firs"/"t."). - Changed to word-break: normal + overflow-wrap: break-word: words wrap whole; very long unbreakable tokens (long URLs/hashes) still break instead of overflowing. - codebody wrap behavior untouched (#130 wrap toggle unaffected). - go vet + go test pass. - Rendered proof (headless chromium, 420px viewport): - Empty-paste result box: "Write or paste something first." renders with no word split; computed style word-break=normal, overflow-wrap=break-word; per-word span check found no word spanning lines (splitWords=[]). - 190-char unbreakable URL in the result box wraps across 4 lines within the box, no horizontal overflow (scrollWidth == clientWidth). - Screenshots: /tmp/pal135_shot_result.png, /tmp/pal135_shot_long.png
fen added 1 commit 2026-09-10 03:49:23 +00:00
Fix result box wrap: word boundaries instead of break-all (#135)
CI / docker (pull_request) Skipped
CI / test (pull_request) Successful in 26s
9f4ed91b8f
fen merged commit b096c2073c into dev 2026-09-10 04:09:14 +00:00
Sign in to join this conversation.