From 1e9cb0101cc3b38912ee1cacb23093f898153bdb Mon Sep 17 00:00:00 2001 From: Marek Osvald Date: Sun, 4 Jul 2021 10:44:23 +0200 Subject: [PATCH] Fix ,muti-line descriptions in unified product CSV export. --- .gitignore | 5 ++++- .../kotlin/cz/drekorian/avonfetcher/model/unified/Product.kt | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index a0cdad5..f4246b9 100644 --- a/.gitignore +++ b/.gitignore @@ -26,4 +26,7 @@ hs_err_pid* .gradle/ # IntelliJ Idea -.idea/ \ No newline at end of file +.idea/ + +# Build +/build/ diff --git a/src/main/kotlin/cz/drekorian/avonfetcher/model/unified/Product.kt b/src/main/kotlin/cz/drekorian/avonfetcher/model/unified/Product.kt index 6dc360d..dcb8555 100644 --- a/src/main/kotlin/cz/drekorian/avonfetcher/model/unified/Product.kt +++ b/src/main/kotlin/cz/drekorian/avonfetcher/model/unified/Product.kt @@ -47,10 +47,10 @@ data class Product( |${if (valid) TRUE else FALSE} |${if (isNew) TRUE else FALSE} |${if (isOnSale) TRUE else FALSE} - |${description + |"${description .lines() .joinToString(separator = LINE_SEPARATOR) - } + }" $ingredients""" .lines() .filterIndexed { index, _ -> index != 0 }