Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Prevent unexpected newline in output for empty files (#35)
* fix: Prevent unexpected newline in output for empty files Modified ReadContentConcurrently and AggregateContent functions in reader package to handle empty content scenarios gracefully. ReadContentConcurrently now checks for empty content before appending to results, ensuring only valid content is processed. AggregateContent skips appending newline separators for empty content, addressing the issue where empty files would erroneously contribute newlines to the final output. - [x] Review the unit tests for ParseContent to ensure they cover the case of empty file input. - [x] Consider adding a test specifically for this scenario to prevent regressions in the future. Closes #31 * test(reader): Prevent regression with empty files Updated tests in reader_test.go to include checks for handling empty files in ParseContent function of reader package. Added tests to verify that ParseContent correctly returns an empty string when provided with an empty file path and a newline character string. This ensures consistent behavior and addresses potential issues highlighted in #31.
- Loading branch information