Skip to content

Commit c39b1a8

Browse files
committed
ignoring white spaces
1 parent c096f94 commit c39b1a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/diffchecker.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
module.exports = {
22
diff: function(ogString, newString) {
33
var diffLines = [];
4-
var ogLines = ogString.split('\n');
4+
var ogLines = ogString.split('\n').map(line => line.trim());
55
var ogLinesStripped = []
66
for (var index = 0; index < ogLines.length; index++) {
77
ogLinesStripped.push(ogLines[index].replace(/;/g, ""));
88
}
9-
var newLines = newString.split('\n');
9+
var newLines = newString.split('\n').map(line => line.trim());
1010

1111
for (var index = 0; index < newLines.length; index++) {
1212
var lineNumber = index + 1;

0 commit comments

Comments
 (0)