Skip to content

Fix magic comment detection with CRLF line endings#218

Merged
soutaro merged 1 commit intosoutaro:mainfrom
topstone:main
Feb 10, 2026
Merged

Fix magic comment detection with CRLF line endings#218
soutaro merged 1 commit intosoutaro:mainfrom
topstone:main

Conversation

@topstone
Copy link
Contributor

Replace \Z with \R?\z in magic comment regex patterns to properly detect # rbs_inline: enabled/disabled comments in files with CRLF line endings.

Fixes processing of Ruby files on Windows and files with CRLF endings.

Replace `\Z` with `\R?\z` in magic comment regex patterns to properly detect `# rbs_inline: enabled/disabled` comments in files with CRLF line endings.

Fixes processing of Ruby files on Windows and files with CRLF endings.
@ParadoxV5
Copy link

👌 intriguing that \Z does not match \r\n\z

Copy link
Owner

@soutaro soutaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@soutaro soutaro enabled auto-merge February 10, 2026 07:18
@soutaro soutaro merged commit 22a5bf9 into soutaro:main Feb 10, 2026
4 checks passed
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.

3 participants