Skip to content
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

Treat CRLF as one character (config option) #354

Closed
ayroblu opened this issue Feb 22, 2022 · 1 comment
Closed

Treat CRLF as one character (config option) #354

ayroblu opened this issue Feb 22, 2022 · 1 comment

Comments

@ayroblu
Copy link

ayroblu commented Feb 22, 2022

Hey! This is great, but I noticed that I'm trying to apply a diff from diffChars, and sometimes there's changes like:

[
  {count: 1, removed: true, value: '\r'},
  {count: 1, added: true, value: ';'},
  {count: 1, value: '\n'},
]

But my editor that I'm using treats the \r\n as one character, so when I delete the \r it actually deletes the whole \r\n. Is it possible to pass a config option or something that "groups" CRLF as one character. (Generic implementation may be useful in other cases, but this is my primary use case)

@ExplodingCabbage
Copy link
Collaborator

I don't totally understand your use case, but I think #344 probably added what you need?

(Still pre-release, but is on master.)

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

No branches or pull requests

2 participants