File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -486,7 +486,20 @@ const config = computed(() => {
486486 )
487487 },
488488 csv : (csvStr : string ) => {
489- const blob = new Blob ([csvStr .replace (' data:text/csv;charset=utf-8,' , ' ' )])
489+ // Extract multiline date format template and replace newlines with spaces in CSV
490+ // This ensures CSV compatibility by converting multiline date ranges to single-line format
491+ const PLACEHOLDER_CHAR = ' \0 '
492+ const multilineDateTemplate = $t (' package.downloads.date_range_multiline' , {
493+ start: PLACEHOLDER_CHAR ,
494+ end: PLACEHOLDER_CHAR ,
495+ })
496+ .replaceAll (PLACEHOLDER_CHAR , ' ' )
497+ .trim ()
498+ const blob = new Blob ([
499+ csvStr
500+ .replace (' data:text/csv;charset=utf-8,' , ' ' )
501+ .replaceAll (` \n ${multilineDateTemplate }` , ` ${multilineDateTemplate } ` ),
502+ ])
490503 const url = URL .createObjectURL (blob )
491504 loadFile (
492505 url ,
You can’t perform that action at this time.
0 commit comments