Skip to content

"No newline at end of file" can be non-trailing #4

Open
@romamik

Description

@romamik

Here is an example patch that fails to parse:

--- a/test.txt
+++ b/test.txt
@@ -1,4 +1,5 @@
 python
 eggy
 hamster
-guido
\ No newline at end of file
+
+hello
\ No newline at end of file

From my understanding, this indicator is added after the line if the line is last and has no \n character at the end.

Now this indicator is modeled as a boolean flag in the patch, but actually there should be two such flags, as we have two last lines: one before the patch and one after the patch.

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