Skip to content

Fix wrapped code line spacing - #3

Merged
tannerlinsley merged 1 commit into
mainfrom
taren/fix-code-line-spacing
Jul 28, 2026
Merged

Fix wrapped code line spacing#3
tannerlinsley merged 1 commit into
mainfrom
taren/fix-code-line-spacing

Conversation

@tannerlinsley

@tannerlinsley tannerlinsley commented Jul 28, 2026

Copy link
Copy Markdown
Member

What changed

  • render wrapped code lines as inline blocks instead of block boxes
  • keep each line at least as wide as its code block while allowing long lines to expand
  • add regression coverage for the base-style contract

Root cause

The renderer intentionally preserves newline text nodes between line wrappers. Styling those wrappers as blocks created an additional visual row for every preserved newline.

Validation

  • pnpm run verify

Summary by CodeRabbit

  • Bug Fixes

    • Improved wrapped-line layout while preserving intentional line breaks.
    • Updated generated styling so lines size correctly within their available width.
  • Tests

    • Added coverage to verify the updated line-layout behavior.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 01e324c8-415f-4a9f-8929-f77ec4945c74

📥 Commits

Reviewing files that changed from the base of the PR and between 169d620 and e3557fb.

📒 Files selected for processing (2)
  • src/theme.ts
  • test/themes.test.ts

📝 Walkthrough

Walkthrough

The base theme CSS now lays out .th-line elements as inline blocks with width: max-content and min-width: 100%. A test verifies the generated rule.

Changes

Wrapped line styling

Layer / File(s) Summary
Base CSS and validation
src/theme.ts, test/themes.test.ts
The .th-line rule changes from block sizing to inline-block layout with full-width minimum sizing, and the generated CSS is covered by a new test.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main change.
Description check ✅ Passed The description covers the change, root cause, and validation, but it should use the template's Changes heading and add fixture/benchmark details.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch taren/fix-code-line-spacing

Comment @coderabbitai help to get the list of available commands.

@tannerlinsley
tannerlinsley merged commit 88a02e3 into main Jul 28, 2026
4 checks passed
@tannerlinsley
tannerlinsley deleted the taren/fix-code-line-spacing branch July 28, 2026 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant