Skip to content

feat(cli): add newline delimiter option and fix crlf behavior#1296

Merged
pamburus merged 1 commit intomasterfrom
feature/delimiter
Jan 24, 2026
Merged

feat(cli): add newline delimiter option and fix crlf behavior#1296
pamburus merged 1 commit intomasterfrom
feature/delimiter

Conversation

@pamburus
Copy link
Copy Markdown
Owner

Summary

Add a new newline delimiter option and fix the incorrect behavior of the crlf option.

Changes

  • Add new --delimiter=newline option that automatically detects and matches either LF (\n) or CRLF (\r\n) line endings, whichever comes first
  • Fix --delimiter=crlf to correctly match only the literal CRLF sequence (\r\n) instead of performing automatic newline detection
  • Update documentation and help text to reflect the new option

⚠️ Breaking Change

The --delimiter=crlf option now strictly matches the \r\n sequence instead of detecting both LF and CRLF.

Migration

If you were using --delimiter=crlf and relied on it matching both \n and \r\n:

  • Replace --delimiter=crlf with --delimiter=newline
  • Or update the HL_DELIMITER environment variable from crlf to newline

Delimiter Options

Value Description
auto Auto-detect delimiter (default)
cr Carriage return (\r)
lf Line feed (\n)
crlf Carriage return followed by line feed (\r\n)
newline Either lf or crlf, whichever comes first
nul Null character (\0)

@pamburus pamburus force-pushed the feature/delimiter branch 3 times, most recently from c439cb3 to e426bda Compare January 24, 2026 23:27
Add a new `newline` delimiter option that automatically detects and
matches either LF (\n) or CRLF (\r\n) line endings.

Previously, the `crlf` option was incorrectly mapped to automatic
newline detection. It now correctly matches only the literal CRLF
sequence (\r\n). Users who relied on the old behavior should switch
to the new `newline` option.

BREAKING CHANGE: The `--delimiter=crlf` option now strictly matches
the \r\n sequence instead of detecting both LF and CRLF. To migrate,
replace `--delimiter=crlf` with `--delimiter=newline` or update the
`HL_DELIMITER` environment variable from `crlf` to `newline`.
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.09%. Comparing base (96bb124) to head (a5d6d19).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1296   +/-   ##
=======================================
  Coverage   88.08%   88.09%           
=======================================
  Files          67       67           
  Lines       11594    11598    +4     
=======================================
+ Hits        10213    10217    +4     
  Misses       1381     1381           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pamburus pamburus marked this pull request as ready for review January 24, 2026 23:39
@pamburus pamburus merged commit b389e4d into master Jan 24, 2026
13 checks passed
@pamburus pamburus deleted the feature/delimiter branch January 24, 2026 23:40
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