Skip to content

Fix error in lsee RegEx to replace ^ with ↑ #2138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 7, 2025

Conversation

MattHeffron
Copy link
Contributor

The RegEx in lsee to replace ^ with didn't quote (backslash) the ^ so it was interpreted as the start of line pattern.

Fixes Discussion #2137

I noticed that this will not convert \r\n to \n, but only changes the \r to \n which, for a files with cr-lf end-of-line, would result in double line spacing. This case shouldn't happen, but could (especially on Windows) by an improperly setup git, or editing a file in a Windows text editor.

@MattHeffron MattHeffron requested review from masinter and pamoroso May 6, 2025 21:41
@MattHeffron MattHeffron added the bug Something isn't working (as per documentation) label May 6, 2025
Copy link
Member

@masinter masinter left a comment

Choose a reason for hiding this comment

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

LGTM

@masinter
Copy link
Member

masinter commented May 7, 2025

This is a cheap hatch that should convert MCCS to utf8. But that would be ....

Copy link
Contributor

@pamoroso pamoroso left a comment

Choose a reason for hiding this comment

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

Now the up arrow no longer appears at the beginning of lines and fixes the issue reported in discussion #2137. Looks good to me.

@masinter masinter merged commit 0f8959a into master May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working (as per documentation)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants