Skip to content

Conversation

@Rithick574
Copy link

Ensure missing trailing cells are treated as empty strings, and add a regression test for headers with empty column values.

Ensure missing trailing cells are treated as empty strings, and add a regression test for headers with empty column values.
@Rithick574
Copy link
Author

Issue: When CSV rows omit trailing empty cells, the parser only iterates row.length, so header columns beyond that are never emitted. This makes columns with all-empty values disappear even with ignoreEmpty: false.

Fix: When ignoreEmpty is false, we iterate up to headers.length and treat missing cells as empty strings. This preserves empty header columns while still skipping entirely blank lines. Added a regression test (dataEmptyColumns) to cover the scenario.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant