Replace newlines with linebreaks when importing without HTML

https://forums.ankiweb.net/t/line-breaks-are-removed-when-importing-csv-on-linux/26451
This commit is contained in:
Damien Elmes 2023-01-18 20:58:44 +10:00
parent 0be9ee8dcc
commit c923553a53

View File

@ -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', "<br>")
}
}