Skip to content

Treat CRLF as one character (config option) #354

Closed
@ayroblu

Description

@ayroblu

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions