Fix note lines starting with #

csv crate doesn't support escaping a leading comment char. :(
This commit is contained in:
RumovZ 2022-06-07 17:59:46 +02:00
parent be8442cfbe
commit 5ece10ad05

View file

@ -81,6 +81,7 @@ fn file_writer_with_header(path: &str) -> Result<csv::Writer<File>> {
write_file_header(&mut file)?;
Ok(csv::WriterBuilder::new()
.delimiter(DELIMITER.byte())
.quote_style(csv::QuoteStyle::Always)
.from_writer(file))
}
@ -95,6 +96,7 @@ fn note_file_writer_with_header(path: &str, ctx: &NoteContext) -> Result<csv::Wr
write_note_file_header(&mut file, ctx)?;
Ok(csv::WriterBuilder::new()
.delimiter(DELIMITER.byte())
.quote_style(csv::QuoteStyle::Always)
.from_writer(file))
}