Repository navigation
feat: wrap prose files in lf-diff by default - #3176
Merged
Merged
Conversation
Expose an overflow choice for patches whose code lines need wrapping or whose prose should keep horizontal scrolling. Let wrapped files use the reader width instead of the scrolling row fill width, so Pierre can actually break their lines. Closes #3173
This was referenced Oct 19, 2026
leaf-agent
added a commit
that referenced
this pull request
Oct 20, 2026
The three inline patches added to the diff gallery in #3176 ended with indentation before `</pre>`. Leaf preserves trailing whitespace in a patch because a space can be a context line, so Pierre read the indentation as extra hunk content and refused each patch. The [main CI run](https://github.com/max-sixty/leaf/actions/runs/39336757143) caught all three while surveying the generated corpus. Place each closing tag at the start of its line and regenerate the corpus. The existing `test_unchanged_margin_passes_over_the_corpus_do_bounded_work_and_write_nothing` failed with these parse errors before the edit and passed after it. The patch still keeps meaningful trailing whitespace in its source; the example now supplies a valid hunk. Co-authored-by: leaf-agent <[email protected]>
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.
Markdown and plain-text hunks now wrap within the diff reader. Code files keep horizontal scrolling, and page authors can set
overflow="wrap"oroverflow="scroll"onlf-difffor the whole patch. The prior row-fill width forced even Pierre's wrapped lines to remain wider than the reader; wrapped files now use the reader width while scrolling files retain their full-line change fill.The browser regression test failed before the change because
overflowwas rejected by page validation, then verified the four reading modes and a line comment on wrapped prose. Focused diff layout and print tests, the corpus vocabulary check, andpnpm run checkpass.Closes #3173 — automated triage