Skip to content

Commit 9acc16c

Browse files
author
Bill Long
committed
Fixes #1
1 parent 4de7b8b commit 9acc16c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

angular-rich-text-diff.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ var AngularRichTextDiff;
4242
var n = -1;
4343
do {
4444
n++;
45-
} while (diffableString.charCodeAt(n) >= this.unicodeRangeStart);
46-
if (n + 1 >= diffableString.length) {
45+
} while (diffableString.charCodeAt(n) >= this.unicodeRangeStart + 1);
46+
if (n >= diffableString.length) {
4747
return diffableString;
4848
}
4949
var openTag = '';

angular-rich-text-diff.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ module AngularRichTextDiff {
6161
do {
6262
n++;
6363
}
64-
while (diffableString.charCodeAt(n) >= this.unicodeRangeStart);
65-
if (n + 1 >= diffableString.length) {
64+
while (diffableString.charCodeAt(n) >= this.unicodeRangeStart + 1);
65+
if (n >= diffableString.length) {
6666
return diffableString;
6767
}
6868

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "angular-rich-text-diff",
33
"main": "angular-rich-text-diff.js",
4-
"version": "0.2.1",
4+
"version": "0.2.2",
55
"authors": [
66
"Bill Long <bill@blackout.us>"
77
],

0 commit comments

Comments
 (0)