From 281c4427dedeedef76731425d9c754604adcfb3d Mon Sep 17 00:00:00 2001 From: mdunisch Date: Fri, 22 Aug 2014 16:13:48 +0200 Subject: [PATCH] - Fixing https://github.com/mdunisch/lololodash/issues/5 - Jsdiff -> word instead of char - 0.2.1 => npm publish --- exercises/5_count_the_comments/exercise.js | 5 ++--- lib/verify.js | 2 +- package.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/exercises/5_count_the_comments/exercise.js b/exercises/5_count_the_comments/exercise.js index 2f9c053..cf3672d 100644 --- a/exercises/5_count_the_comments/exercise.js +++ b/exercises/5_count_the_comments/exercise.js @@ -5,8 +5,7 @@ var verify = require("../../lib/verify.js"), var run = { - json: [{ username: "tim", comment: "you doing a great job!" }, - { username: "tim", comment: "when you have new workshoppers?" }, + json: [ { username: "tim", comment: "when you have new workshoppers?" }, { username: "cat_lover", comment: "wtf? where are all the cats gone?" }, { username: "max", comment: "where have you been on friday? we missed you!" }, { username: "max", comment: "Do dont anwer anymore - why?" }, @@ -23,7 +22,7 @@ var run = { }, { "username": "tim", - "comment_count": 2 + "comment_count": 1 } ] }; diff --git a/lib/verify.js b/lib/verify.js index f0b04bb..76d7f64 100644 --- a/lib/verify.js +++ b/lib/verify.js @@ -43,7 +43,7 @@ function line(n, sep) { function diffsould(shouldbe, output) { - var diff = jsdiff.diffChars(output, shouldbe); + var diff = jsdiff.diffWords(output, shouldbe); var string = ""; diff.forEach(function (part) { diff --git a/package.json b/package.json index 3461a34..d104799 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lololodash", - "version": "0.2.0", + "version": "0.2.1", "description": "A Set of Lo-Dash Javascript Exercises", "main": "lololodash.js", "repository": {