From c923553a53790a2ec65750afabd8acffe7551fe8 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 18 Jan 2023 20:58:44 +1000 Subject: [PATCH] Replace newlines with linebreaks when importing without HTML https://forums.ankiweb.net/t/line-breaks-are-removed-when-importing-csv-on-linux/26451 --- rslib/src/import_export/text/csv/import.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rslib/src/import_export/text/csv/import.rs b/rslib/src/import_export/text/csv/import.rs index a95b84494..b3be378de 100644 --- a/rslib/src/import_export/text/csv/import.rs +++ b/rslib/src/import_export/text/csv/import.rs @@ -207,7 +207,7 @@ fn stringify_fn(is_html: bool) -> fn(&str) -> String { if is_html { ToString::to_string } else { - htmlescape::encode_minimal + |s| htmlescape::encode_minimal(s).replace('\n', "
") } }