Repository navigation
fix: drop a space chunk that overflows instead of indenting the next line - #9
Merged
Merged
Conversation
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.
Closes #7
変更理由
改行位置が要求幅ちょうどに落ちると、
wrap_spansは溢れた空白 chunk を新しい行の先頭へ運んでいた。flattenは行末の空白しか落とさないため、継続行が 1 桁インデントされ、次の語が行幅ちょうどのときは段落の途中に空行が出ていた。影響範囲
src/layout/wrap.rs— 溢れ判定を先に行い、flush 後に既存の「行頭空白は捨てる」規則へ合流させた。禁則の結合ロジック(chunk())には触れていない確認手順
cargo test --test render/cargo test --test cli— 通過cargo test --bin mdvu— wrap の unit test は追加分含め通過。pager::watchの 2 件はこの変更の前から落ちる既存の失敗(ローカル環境のファイル監視制約)で、CI では通る想定--plain --width 38で確認: