Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mdman] Normalize newlines when rendering options #14428

Merged
merged 2 commits into from
Aug 20, 2024

Conversation

dpaoliello
Copy link
Contributor

When using cargo build-man on Windows, I noticed that some files I didn't modify were getting modified, specifically they had an extra space added in the middle of a code block in an option description.

The root cause appears to be that if a code block in a handlebars template was split across multiple lines, then both the \r and the \n were being converted to spaces.

The fix for this is to normalize newlines to \n after templates are expanded by handlebars but before the individual formatters render the block as an option.

@rustbot
Copy link
Collaborator

rustbot commented Aug 19, 2024

r? @epage

rustbot has assigned @epage.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-cli-help Area: built-in command-line help S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 19, 2024
@epage
Copy link
Contributor

epage commented Aug 20, 2024

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 20, 2024

📌 Commit 8e2a37c has been approved by epage

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 20, 2024
@bors
Copy link
Collaborator

bors commented Aug 20, 2024

⌛ Testing commit 8e2a37c with merge 9e152bb...

@bors
Copy link
Collaborator

bors commented Aug 20, 2024

☀️ Test successful - checks-actions
Approved by: epage
Pushing 9e152bb to master...

@bors bors merged commit 9e152bb into rust-lang:master Aug 20, 2024
22 checks passed
@dpaoliello dpaoliello deleted the mdman branch August 20, 2024 19:21
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 22, 2024
Update cargo

12 commits in ba8b39413c74d08494f94a7542fe79aa636e1661..8f40fc59fb0c8df91c97405785197f3c630304ea
2024-08-16 22:48:57 +0000 to 2024-08-21 22:37:06 +0000
- Tests rely on absence of RUST_BACKTRACE (rust-lang/cargo#14441)
- fix: -Cmetadata includes whether extra rustflags is same as host (rust-lang/cargo#14432)
- [mdman] Normalize newlines when rendering options (rust-lang/cargo#14428)
- fix: doctest respects Cargo's color options (rust-lang/cargo#14425)
- Be more permissive while packaging unpublishable crates. (rust-lang/cargo#14408)
- fix: Limiting pre-release match semantics to use only on `OptVersionReq::Req` (rust-lang/cargo#14412)
- test: add a regression test for Issue 14409 (rust-lang/cargo#14430)
- chore: update label trigger for Command-info (rust-lang/cargo#14422)
- doc: add lockfile-path unstable doc section (rust-lang/cargo#14423)
- doc: update lockfile-path tracking issue (rust-lang/cargo#14424)
- fix: remove list owners feature of info subcommand (rust-lang/cargo#14418)
- Lockfile path tests (follow-up) (rust-lang/cargo#14417)
@rustbot rustbot added this to the 1.82.0 milestone Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli-help Area: built-in command-line help S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants