prosemirror-changeset 2.4.0 → 2.4.1
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/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/README.md +1 -1
- package/src/simplify.ts +1 -1
- package/test/test-simplify.ts +3 -0
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ in order to do such change tracking in a halfway performant way during
|
|
|
7
7
|
live editing.
|
|
8
8
|
|
|
9
9
|
This code is licensed under an [MIT
|
|
10
|
-
licence](https://
|
|
10
|
+
licence](https://code.haverbeke.berlin/prosemirror/prosemirror-changeset/src/branch/main/LICENSE).
|
|
11
11
|
|
|
12
12
|
## Programming interface
|
|
13
13
|
|
package/dist/index.cjs
CHANGED
|
@@ -299,7 +299,7 @@ try {
|
|
|
299
299
|
} catch (_) {}
|
|
300
300
|
var nonASCIISingleCaseWordChar = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
|
|
301
301
|
function isLetter(code) {
|
|
302
|
-
if (code < 128) return code >= 48 && code <= 57 || code >= 65 && code <= 90 || code >=
|
|
302
|
+
if (code < 128) return code >= 48 && code <= 57 || code >= 65 && code <= 90 || code >= 97 && code <= 122;
|
|
303
303
|
var ch = String.fromCharCode(code);
|
|
304
304
|
if (letter) return letter.test(ch);
|
|
305
305
|
return ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch);
|
package/dist/index.js
CHANGED
|
@@ -374,7 +374,7 @@ catch (_) { }
|
|
|
374
374
|
const nonASCIISingleCaseWordChar = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
|
|
375
375
|
function isLetter(code) {
|
|
376
376
|
if (code < 128)
|
|
377
|
-
return code >= 48 && code <= 57 || code >= 65 && code <= 90 || code >=
|
|
377
|
+
return code >= 48 && code <= 57 || code >= 65 && code <= 90 || code >= 97 && code <= 122;
|
|
378
378
|
let ch = String.fromCharCode(code);
|
|
379
379
|
if (letter)
|
|
380
380
|
return letter.test(ch);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prosemirror-changeset",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"description": "Distills a series of editing steps into deleted and added ranges",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
],
|
|
22
22
|
"repository": {
|
|
23
23
|
"type": "git",
|
|
24
|
-
"url": "git://
|
|
24
|
+
"url": "git+https://code.haverbeke.berlin/prosemirror/prosemirror-changeset.git"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"prosemirror-transform": "^1.0.0"
|
package/src/README.md
CHANGED
|
@@ -7,7 +7,7 @@ in order to do such change tracking in a halfway performant way during
|
|
|
7
7
|
live editing.
|
|
8
8
|
|
|
9
9
|
This code is licensed under an [MIT
|
|
10
|
-
licence](https://
|
|
10
|
+
licence](https://code.haverbeke.berlin/prosemirror/prosemirror-changeset/src/branch/main/LICENSE).
|
|
11
11
|
|
|
12
12
|
## Programming interface
|
|
13
13
|
|
package/src/simplify.ts
CHANGED
|
@@ -12,7 +12,7 @@ const nonASCIISingleCaseWordChar = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u304
|
|
|
12
12
|
|
|
13
13
|
function isLetter(code: number) {
|
|
14
14
|
if (code < 128)
|
|
15
|
-
return code >= 48 && code <= 57 || code >= 65 && code <= 90 || code >=
|
|
15
|
+
return code >= 48 && code <= 57 || code >= 65 && code <= 90 || code >= 97 && code <= 122
|
|
16
16
|
let ch = String.fromCharCode(code)
|
|
17
17
|
if (letter) return letter.test(ch)
|
|
18
18
|
return ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch)
|
package/test/test-simplify.ts
CHANGED
|
@@ -25,6 +25,9 @@ describe("simplifyChanges", () => {
|
|
|
25
25
|
it("doesn't expand across non-word text", () => test(
|
|
26
26
|
[[7, 10]], doc(p("one two ----- four")), [[5, 10]]))
|
|
27
27
|
|
|
28
|
+
it("doesn't expand replacements across bracket characters", () => test(
|
|
29
|
+
[[7, 10]], doc(p("one two [SFX] four")), [[5, 10]]))
|
|
30
|
+
|
|
28
31
|
it("treats leaf nodes as non-words", () => test(
|
|
29
32
|
[[2, 3], [6, 7]], doc(p("one", img(), "two")), [[2, 3], [6, 7]]))
|
|
30
33
|
|