@@ -764,13 +764,11 @@ export function isSimpleQuotedMultiLine(value: any): boolean {
764764 return false ;
765765 }
766766
767- if ( ! NEWLINE_CHARS . find ( char => value . indexOf ( char ) > - 1 ) )
768- return false ;
767+ if ( ! NEWLINE_CHARS . find ( char => value . indexOf ( char ) > - 1 ) ) return false ;
769768
770769 const strVal = value + '' ;
771770 if ( strVal . length <= 2 ) return false ; // need at least 2 characters to be quoted with something in between
772- if ( ! strVal . startsWith ( '"' ) || ! strVal . endsWith ( '"' ) )
773- return false
771+ if ( ! strVal . startsWith ( '"' ) || ! strVal . endsWith ( '"' ) ) return false ;
774772
775773 const innerValue = strVal . substring ( 1 , strVal . length - 1 ) ;
776774 return innerValue . indexOf ( '"' ) === - 1 ;
@@ -780,13 +778,19 @@ export function joinMultiValueForExport(values: string[]): string {
780778 return Papa . unparse ( [ values ] , { delimiter : ',' } ) ;
781779}
782780
783- const processParsedResults = ( results , removeEmpty : boolean = true , trimSpace ?: boolean ) : string [ ] => {
784- return results . data [ 0 ] ?. map ( value => ( trimSpace && Utils . isString ( value ) ? value . trim ( ) : value ) )
785- . filter ( value_ => removeEmpty ? value_ !== '' : true )
786- }
781+ const processParsedResults = ( results , removeEmpty = true , trimSpace ?: boolean ) : string [ ] => {
782+ return results . data [ 0 ]
783+ ?. map ( value => ( trimSpace && Utils . isString ( value ) ? value . trim ( ) : value ) )
784+ . filter ( value_ => ( removeEmpty ? value_ !== '' : true ) ) ;
785+ } ;
787786// Port of Java PageFlowUtil.splitStringToValuesForImport — Google Sheets-compatible CSV parsing
788787// for multi-value (multi-select) column values. Fixed comma delimiter, double-quote quoting.
789- export function splitMultiValueForImport ( str : string , delimiter : string = ',' , removeEmpty : boolean = true , trimSpace ?: boolean ) : string [ ] {
788+ export function splitMultiValueForImport (
789+ str : string ,
790+ delimiter = ',' ,
791+ removeEmpty = true ,
792+ trimSpace ?: boolean
793+ ) : string [ ] {
790794 if ( str === null ) return null ;
791795 if ( str === undefined ) return undefined ;
792796 if ( ! str ) {
0 commit comments