Skip to content

Need to consider cross-platform linebreak handling #2

@jonm

Description

@jonm

RFC 2046 requires that text/* types use CRLF as linebreaks, which is how the grammar is currently written. However, I suspect that many actual diff outputs would not actually adhere to this on a byte-for-byte basis. In particular, I suspect that most Unix diffs will just use newlines. There are a few possibilities for addressing this:

  • Just allow multiple linebreak types, so long as they are consistent through the file (this is the RFC 2616 approach for HTTP)
  • Register it as application/diff instead of text/diff.
  • Augment the grammar to allow for multiple (but consistent) linebreak styles. This might mean that a newline-terminated patch file might "look" to a generic text/plain processor as a single long line, but maybe that's ok.

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