react-diff-view
Advanced tools
Comparing version 1.4.4 to 1.4.5
{ | ||
"name": "react-diff-view", | ||
"version": "1.4.4", | ||
"version": "1.4.5", | ||
"description": "A git diff component to consume the git unified diff output.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -487,1 +487,5 @@ # react-diff-view | ||
- Simplified `sliceHunk` internal function to have a more stable behavior. | ||
### 1.4.5 | ||
- Fix an issue where hunks with insert changes at tail will fail to merge. |
@@ -25,2 +25,4 @@ import leven from 'leven'; | ||
const getOldRangeFromHunk = ({oldStart, oldLines}) => [oldStart, oldStart + oldLines + 1]; | ||
const createHunkFromChanges = changes => { | ||
@@ -235,6 +237,4 @@ if (!changes.length) { | ||
const previousStart = computeOldLineNumber(first(previousHunk.changes)); | ||
const previousEnd = computeOldLineNumber(last(previousHunk.changes)); | ||
const nextStart = computeOldLineNumber(first(nextHunk.changes)); | ||
const nextEnd = computeOldLineNumber(last(nextHunk.changes)); | ||
const [previousStart, previousEnd] = getOldRangeFromHunk(previousHunk); | ||
const [nextStart, nextEnd] = getOldRangeFromHunk(nextHunk); | ||
@@ -241,0 +241,0 @@ // They are just neighboring, simply concat changes and adjust lines count |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
695653
491
1638