Skip to content

Commit

Permalink
infra: don’t emit Filename: in mdbook-trpl-listing output
Browse files Browse the repository at this point in the history
Noted by the NoStarch folks when working on edits for Ch. 17.
  • Loading branch information
chriskrycho committed Jan 13, 2025
1 parent 5a65e2a commit 551b0ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/mdbook-trpl/src/listing/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ impl Listing {
fn opening_text(&self) -> String {
self.file_name
.as_ref()
.map(|file_name| format!("Filename: {file_name}\n"))
.map(|file_name| format!("{file_name}\n"))
.unwrap_or_default()
}

Expand Down
2 changes: 1 addition & 1 deletion packages/mdbook-trpl/src/listing/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Trailing text."#,
&result.unwrap(),
r#"Leading text.
Filename: src/main.rs
src/main.rs
```rust
fn main() {}
Expand Down

0 comments on commit 551b0ff

Please sign in to comment.