mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-16 06:06:56 +08:00
Merge pull request #7246 from G-Chubinidze/gc_SCI_10200
Inventory export for checklists with return delimiter should escape the return sign [SCI-10200]
This commit is contained in:
commit
6d74152414
2 changed files with 5 additions and 2 deletions
|
@ -22,7 +22,7 @@ class RepositoryChecklistValue < ApplicationRecord
|
|||
EXTRA_PRELOAD_INCLUDE = :repository_checklist_items
|
||||
|
||||
def formatted(separator: ' | ')
|
||||
repository_checklist_items.pluck(:data).join(separator)
|
||||
repository_checklist_items.pluck(:data).join(separator).gsub("\n", "\\n")
|
||||
end
|
||||
|
||||
def export_formatted
|
||||
|
|
|
@ -44,7 +44,10 @@ class SpreadsheetParser
|
|||
if row && i.zero?
|
||||
header = row
|
||||
else
|
||||
columns = row
|
||||
escaped_row = row.map do |cell|
|
||||
cell.gsub("\\n", "\n")
|
||||
end
|
||||
columns = escaped_row
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue