We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e80648d commit 7c24a20Copy full SHA for 7c24a20
test/diff/word.js
@@ -31,6 +31,33 @@ describe('WordDiff', function() {
31
'.'
32
]);
33
});
34
+
35
+ // Test for bug reported at https://github.com/kpdecker/jsdiff/issues/553
36
+ it('should treat numbers as part of a word if not separated by whitespace or punctuation', () => {
37
+ expect(
38
+ wordDiff.tokenize(
39
+ 'Tea Too, also known as T2, had revenue of 57m AUD in 2012-13.'
40
+ )
41
+ ).to.deep.equal([
42
+ 'Tea ',
43
+ ' Too',
44
+ ', ',
45
+ ' also ',
46
+ ' known ',
47
+ ' as ',
48
+ ' T2',
49
50
+ ' had ',
51
+ ' revenue ',
52
+ ' of ',
53
+ ' 57m ',
54
+ ' AUD ',
55
+ ' in ',
56
+ ' 2012',
57
+ '-',
58
+ '2013'
59
+ ]);
60
+ });
61
62
63
describe('#diffWords', function() {
0 commit comments