Skip to content
This repository was archived by the owner on Mar 27, 2024. It is now read-only.

Commit e700f76

Browse files
Merge pull request #272 from briandealwis/i271
Split lines prior to diffing
2 parents 392203e + b2e31fb commit e700f76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

util/diff_utils.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ func DiffFile(image1, image2 *pkgutil.Image, filename string) (*FileNameDiff, er
167167
}
168168

169169
//Carry on with diffing, make string array for difflib requirements
170-
image1Contents := []string{string(*image1FileContents)}
171-
image2Contents := []string{string(*image2FileContents)}
170+
image1Contents := difflib.SplitLines(string(*image1FileContents))
171+
image2Contents := difflib.SplitLines(string(*image2FileContents))
172172

173173
//Run diff
174174
diff := difflib.UnifiedDiff{

0 commit comments

Comments
 (0)