Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bugfix] Untangle the connection between pr_comment.c and io.c, fixin…
…g at least two bugs. It's pr_comment.c that should decide whether to put a "star comment continuation" or not. This duplicates code a bit, but it simplifies pr_comment() at the same time since pr_comment() no longer has to "signal" whether a star continuation is needed or not. This change requires indent(1) to not wrap comment lines that lack a blank character, but I think it's for the better if you look at cases when that happens (mostly long URIs and file system paths, which arguably shouldn't be wrapped). It also fixes two bugs: 1. Cases where asterisk is a part of the comment's content (like in "*we* are the champions") and happens to appear at the beginning of the line, misleading dump_line() into thinking that this is part of the star comment continuation, leading to misalignment. 2. Cases where blank starred lines had three too many characters on the line when wrapped.
- Loading branch information
Showing
2 changed files
with
37 additions
and
61 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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