Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion custom_md_loader/classes/CSVFileUtil.cls
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ public class CSVFileUtil {
// check for blank CSV lines (only commas)
if (line.replaceAll(',','').trim().length() == 0) break;

List<String> fields = line.split(',');
// -1 in the split method will not remove empty values at the end in the result list.
// For example, if a csv file line has A,B,, -> The result of this split would be
// ['A', 'B', '', '']. Withouth -1 in the method it would be ['A', 'B']
List<String> fields = line.split(',', -1);
List<String> cleanFields = new List<String>();
String compositeField;
Boolean makeCompositeField = false;
Expand Down