@marijn/find-cluster-break 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -61,7 +61,7 @@ function nextClusterBreak(str, pos, includeExtending) {
61
61
  }
62
62
 
63
63
  function prevClusterBreak(str, pos, includeExtending) {
64
- while (pos > 0) {
64
+ while (pos > 1) {
65
65
  let found = nextClusterBreak(str, pos - 2, includeExtending);
66
66
  if (found < pos) return found
67
67
  pos--;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marijn/find-cluster-break",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "type": "module",
5
5
  "description": "Find the position of grapheme cluster breaks in a string",
6
6
  "main": "src/index.js",
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "repository": {
16
16
  "type": "git",
17
- "url": "git+https://github.com/marijnh/find-cluster-break.git"
17
+ "url": "git+https://code.haverbeke.berlin/marijn/find-cluster-break.git"
18
18
  },
19
19
  "keywords": [
20
20
  "unicode",
@@ -25,9 +25,9 @@
25
25
  "author": "Marijn Haverbeke <marijn@haverbeke.berlin>",
26
26
  "license": "MIT",
27
27
  "bugs": {
28
- "url": "https://github.com/marijnh/find-cluster-break/issues"
28
+ "url": "https://code.haverbeke.berlin/marijn/find-cluster-break/issues"
29
29
  },
30
- "homepage": "https://github.com/marijnh/find-cluster-break#readme",
30
+ "homepage": "https://code.haverbeke.berlin/marijn/find-cluster-break",
31
31
  "devDependencies": {
32
32
  "mocha": "^10.7.3",
33
33
  "rollup": "^4.28.1"
package/src/index.js CHANGED
@@ -66,7 +66,7 @@ function nextClusterBreak(str, pos, includeExtending) {
66
66
  }
67
67
 
68
68
  function prevClusterBreak(str, pos, includeExtending) {
69
- while (pos > 0) {
69
+ while (pos > 1) {
70
70
  let found = nextClusterBreak(str, pos - 2, includeExtending)
71
71
  if (found < pos) return found
72
72
  pos--