toml icon indicating copy to clipboard operation
toml copied to clipboard

Decor in `DocumentMut` is ignored

Open yyny opened this issue 9 months ago • 2 comments

Example

use toml_edit::*;

let mut document = DocumentMut::new();
document.decor_mut().set_prefix("# HEADER\n");
document.decor_mut().set_prefix("# FOOTER\n");
println!("{document}");

document.as_table_mut().insert("key", value("value"));
println!("{document}");

Expected

# HEADER
# FOOTER
# HEADER
key = "value"
# FOOTER

Actual

key = "value"

yyny avatar May 10 '24 08:05 yyny