Fix code wrapping for syntax-highlighted output #3

Merged
YunxiaoXu merged 2 commits from hotfix/code-wrap into main 2026-04-04 15:06:49 -07:00
Owner

Summary

  • enable line wrapping for syntax-highlighted output by passing word_wrap=True to Rich Syntax
  • keep pager behavior unchanged; this hotfix only addresses readability of long code lines
  • bump package metadata and lockfile to 0.3.1 for the hotfix release

Validation

  • uv run pytest tests/test_render.py tests/test_cli.py
  • uv run rp --version

Notes

  • this changes code rendering paths in src/rp/render.py
  • regression coverage was added in tests/test_render.py
  • version metadata is synced across pyproject.toml, src/rp/__init__.py, and uv.lock
## Summary - enable line wrapping for syntax-highlighted output by passing `word_wrap=True` to Rich `Syntax` - keep pager behavior unchanged; this hotfix only addresses readability of long code lines - bump package metadata and lockfile to `0.3.1` for the hotfix release ## Validation - `uv run pytest tests/test_render.py tests/test_cli.py` - `uv run rp --version` ## Notes - this changes code rendering paths in `src/rp/render.py` - regression coverage was added in `tests/test_render.py` - version metadata is synced across `pyproject.toml`, `src/rp/__init__.py`, and `uv.lock`
YunxiaoXu added 2 commits 2026-04-04 15:04:00 -07:00
Long code lines were clipped at the terminal width, making them
unreadable. Pass word_wrap=True to all Syntax() calls so lines wrap
instead of being cut off.
Bump version to 0.3.1
All checks were successful
CI / lint (pull_request) Successful in -25s
CI / typecheck (pull_request) Successful in -22s
CI / test (3.12) (pull_request) Successful in -24s
CI / test (3.13) (pull_request) Successful in -23s
CI / test (3.14) (pull_request) Successful in -26s
868656ea12
YunxiaoXu merged commit ee67bcb768 into main 2026-04-04 15:06:49 -07:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: YunxiaoXu/rich-print#3