Skip to content

Fix YAML validation with CR-only line endings#13999

Merged
cderv merged 1 commit intomainfrom
fix/issue-13998
Feb 5, 2026
Merged

Fix YAML validation with CR-only line endings#13999
cderv merged 1 commit intomainfrom
fix/issue-13998

Conversation

@cderv
Copy link
Collaborator

@cderv cderv commented Feb 5, 2026

Fixes #13998

Files with CR-only line terminators (\r, old Mac format) fail YAML validation because the regex /\r?\n/g for line splitting doesn't match standalone CR.

Changed regex to /\r\n?|\n/g in all 4 locations that split text into lines.

The regex `/\r?\n/g` for line splitting matched LF and CRLF but not
standalone CR (old Mac format). Files with CR-only line endings were
treated as a single line, causing YAML validation to fail.

Changed regex to `/\r\n?|\n/g` in all 4 locations that split lines.

Fixes #13998

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@posit-snyk-bot
Copy link
Collaborator

posit-snyk-bot commented Feb 5, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@cderv cderv merged commit 762a4c3 into main Feb 5, 2026
51 checks passed
@cderv cderv deleted the fix/issue-13998 branch February 5, 2026 17:06
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.

YAML validation error when file has only CR line terminators

2 participants