Skip to content

Empty edits can be made #2126

Description

@trichoplax

Describe the bug
Following #2119 or #2123 it is possible to save an edit that makes no changes. Previously this was impossible, and we have a test to ensure this, but the test had body_markdown containing no newlines, so did not detect that a line ending style only change is detected as a change and allows the edit.

To Reproduce
Steps to reproduce the behavior:
I've added a test to detect an edit being accepted with only line ending style changes that is correctly failing due to this issue. It can be merged once a fix makes it pass.

See also this example in production. I caused this simply by pressing Edit under the question and pressing Save.

Expected behavior
An edit that contains only line ending style changes should be treated as an empty edit and rejected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions