Skip to content

Commit

Permalink
Fix some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
eGavr committed Jul 15, 2014
1 parent b0e63f9 commit 13ce98d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/diff-logger.js
Expand Up @@ -20,7 +20,7 @@ function getDiffText(diff, options) {
var charsAroundDiff = options.charsAroundDiff,
output = '';

if (charsAroundDiff > 0) {
if (charsAroundDiff < 0) {
charsAroundDiff = 20;
}

Expand All @@ -35,7 +35,7 @@ function getDiffText(diff, options) {
if (part.removed) color = 'red';

if (color !== 'grey') {
output += (!index ? '\n' : '') + partValue[color];
output += (!index ? '\n' : '') + partValue[color];

return;
}
Expand Down
2 changes: 2 additions & 0 deletions lib/index.js
Expand Up @@ -142,6 +142,8 @@ HtmlDiffer.prototype.diffHtml = function(html1, html2, options) {
console.warn('WARNING! The third param of "diffHtml" method is deprecated!');
}

options = _.defaults(this.options, options);

var htmlDiffer = new HtmlDiff(options);

return htmlDiffer.diff(html1, html2);
Expand Down
2 changes: 1 addition & 1 deletion lib/utils.js
Expand Up @@ -38,7 +38,7 @@ exports.parseAttr = function(val, isClick) {
};

/**
* Sorts the gieven CSS class attribute
* Sorts the given CSS class attribute
* @param {String} cssClasses
* @returns {String}
*/
Expand Down

0 comments on commit 13ce98d

Please sign in to comment.