Skip to content

diff2html false positive deleted file parsing error  #17

@jung-kim

Description

@jung-kim

Below code shows --> line as a deleted line although it is not deleted.

I think regex should be fixed to ^-

m = "diff --git a/a.xml b/b.xml"
+ "\nindex e54317e..82a9a56 100644"
+ "\n--- a/a.xml"
+ "\n+++ b/b.xml"
+ "\n@@ -242,4 +242,6 @@ need to create a new job for native server java api and move these tests to a ne"
+ "\n                </packages>"
+ "\n        </test>"
+ "\n -->"
+ "\n+"
+ "\n+";

var diff2html = require('diff2html').Diff2Html;

console.log(diff2html.getJsonFromDiff(m));

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions