cldr-segmentation
Advanced tools
Comparing version 2.2.0 to 2.2.1
@@ -0,1 +1,4 @@ | ||
## 2.2.1 | ||
* Fix issue causing sentence segmentation to return incorrect results when a string ends with a suppression directly followed by a single space (#18, @didier-84) | ||
## 2.2.0 | ||
@@ -2,0 +5,0 @@ * Add Turkish suppressions (#17, @ozdemirburak) |
{ | ||
"name": "cldr-segmentation", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "CLDR text segmentation for JavaScript", | ||
@@ -5,0 +5,0 @@ "main": "dist/cldr-segmentation.js", |
@@ -48,3 +48,10 @@ ( () => { | ||
}); | ||
it('splits correctly when a string ends with a suppression directly followed by a single space', () => { | ||
let str = "I like the Mrs. "; | ||
let result = cldrSegmentation.sentenceSplit(str, englishSuppressions); | ||
expect(result).toEqual(["I like the Mrs. "]); | ||
}); | ||
}); | ||
})(); |
@@ -28,3 +28,3 @@ export class RuleSet { | ||
if (this.suppressions.shouldBreak(cursor)) { | ||
if (cursor.isEos() || this.suppressions.shouldBreak(cursor)) { | ||
callback(cursor.actualPosition); | ||
@@ -31,0 +31,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1383269
16651