Skip to content

Commit

Permalink
Escaping quotes in extended header ASCII output values.
Browse files Browse the repository at this point in the history
  • Loading branch information
billallen256 committed Nov 3, 2024
1 parent c35727b commit 929cdbd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bluefile"
version = "0.5.2"
version = "0.5.3"
edition = "2021"
license = "Apache-2.0"
readme = "README.md"
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ Additional examples can be found in the `tests` directory and in the `bluejay` u

Bluejay is a command line utility for getting bluefile header info in JSON format.

```
```sh
cargo install bluefile
bluejay /path/to/bluefile
```

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ pub struct ExtKeywordValue {
impl fmt::Display for ExtKeywordValue {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self.format {
'A' | 'S' | 'Z' => write!(f, "\"{}\"", from_utf8(&self.raw_value).unwrap()),
'A' | 'S' | 'Z' => write!(f, "\"{}\"", from_utf8(&self.raw_value).unwrap().replace('\"', "\\\"")),
'B' => write!(f, "{}", byte_to_i8(self.raw_value[0]).unwrap()),
'I' => write!(f, "{}", bytes_to_i16(&self.raw_value[0..1], self.endianness).unwrap()),
'L' => write!(f, "{}", bytes_to_i32(&self.raw_value[0..4], self.endianness).unwrap()),
Expand Down

0 comments on commit 929cdbd

Please sign in to comment.