mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -04:00
Fix note lines starting with #
csv crate doesn't support escaping a leading comment char. :(
This commit is contained in:
parent
be8442cfbe
commit
5ece10ad05
1 changed files with 2 additions and 0 deletions
|
@ -81,6 +81,7 @@ fn file_writer_with_header(path: &str) -> Result<csv::Writer<File>> {
|
||||||
write_file_header(&mut file)?;
|
write_file_header(&mut file)?;
|
||||||
Ok(csv::WriterBuilder::new()
|
Ok(csv::WriterBuilder::new()
|
||||||
.delimiter(DELIMITER.byte())
|
.delimiter(DELIMITER.byte())
|
||||||
|
.quote_style(csv::QuoteStyle::Always)
|
||||||
.from_writer(file))
|
.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)?;
|
write_note_file_header(&mut file, ctx)?;
|
||||||
Ok(csv::WriterBuilder::new()
|
Ok(csv::WriterBuilder::new()
|
||||||
.delimiter(DELIMITER.byte())
|
.delimiter(DELIMITER.byte())
|
||||||
|
.quote_style(csv::QuoteStyle::Always)
|
||||||
.from_writer(file))
|
.from_writer(file))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue