Repository navigation
fix(changelog): keep line breaks in code blocks - #59762
Merged
Merged
Conversation
There was a problem hiding this comment.
The fix looks correct. The new main pre code { white-space: pre; } rule is more specific than main code { white-space: nowrap; }, so code blocks keep their line breaks and inline code still doesn't wrap. overflow-x: auto keeps long lines scrolling inside the block, and the 12px bottom margin matches .markdown p.
I rendered the current CHANGELOG.md through handle() and confirmed the diff block comes out as <pre><code> with its newlines and the new rules are in the page CSS. I couldn't check the page in a browser here; there is no browser in my sandbox. bun test passes and tsc --noEmit passes.
The public API is unchanged; only the changelog page's CSS changes.
I have no concerns.
alsuren
pushed a commit
to alsuren/opencode
that referenced
this pull request
Oct 28, 2026
Co-authored-by: Hona <10430890+Hona@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fenced code blocks on
/changelogrendered on a single line. Themain coderule setswhite-space: nowrapfor inline code, and it also applied to<pre><code>, so the lines in the v2.2.0diffblock were joined and the line widened the page.This change adds two rules:
main pre code { white-space: pre; }keeps the line breaks.main pre { overflow-x: auto; margin: 0 0 12px; }scrolls long lines inside the block instead of the page and matches paragraph spacing.No syntax highlighting is added.
Verification: I rendered the current
CHANGELOG.mdthrough the worker'shandle()at 1280px and 390px in dark mode. The diff block shows four lines, and the<pre>scroll width equals its client width at both sizes.bun testandbun typecheckpass inservices/changelog.Requested by: @Hona (Hona via Slack)