@atlaskit/prosemirror-input-rules 3.6.5 → 3.6.6
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 +7 -0
- package/dist/cjs/handler.js +4 -1
- package/dist/es2019/handler.js +2 -1
- package/dist/esm/handler.js +4 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/prosemirror-input-rules
|
|
2
2
|
|
|
3
|
+
## 3.6.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`289a5bde2611b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/289a5bde2611b) -
|
|
8
|
+
[ux] [EDITOR-3750] fix unwanted autoformatting by limiting checks to rules with backwards matches
|
|
9
|
+
|
|
3
10
|
## 3.6.5
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
package/dist/cjs/handler.js
CHANGED
|
@@ -52,8 +52,11 @@ var createInputEventHandler = exports.createInputEventHandler = function createI
|
|
|
52
52
|
}
|
|
53
53
|
var textAfter = text + $from.parent.textBetween($from.parentOffset, Math.min($from.parent.content.size, $from.parentOffset + _constants.MAX_REGEX_MATCH), undefined, _constants.leafNodeReplacementCharacter);
|
|
54
54
|
isBackwardMatch = true;
|
|
55
|
+
var backwardMatchRules = rules.filter(function (rule) {
|
|
56
|
+
return rule.allowsBackwardMatch;
|
|
57
|
+
});
|
|
55
58
|
result = findMatchOnRules({
|
|
56
|
-
rules:
|
|
59
|
+
rules: backwardMatchRules,
|
|
57
60
|
textToMatch: textAfter,
|
|
58
61
|
from: from,
|
|
59
62
|
to: to,
|
package/dist/es2019/handler.js
CHANGED
|
@@ -43,8 +43,9 @@ export const createInputEventHandler = ({
|
|
|
43
43
|
}
|
|
44
44
|
const textAfter = text + $from.parent.textBetween($from.parentOffset, Math.min($from.parent.content.size, $from.parentOffset + MAX_REGEX_MATCH), undefined, leafNodeReplacementCharacter);
|
|
45
45
|
isBackwardMatch = true;
|
|
46
|
+
const backwardMatchRules = rules.filter(rule => rule.allowsBackwardMatch);
|
|
46
47
|
result = findMatchOnRules({
|
|
47
|
-
rules,
|
|
48
|
+
rules: backwardMatchRules,
|
|
48
49
|
textToMatch: textAfter,
|
|
49
50
|
from,
|
|
50
51
|
to,
|
package/dist/esm/handler.js
CHANGED
|
@@ -45,8 +45,11 @@ export var createInputEventHandler = function createInputEventHandler(_ref) {
|
|
|
45
45
|
}
|
|
46
46
|
var textAfter = text + $from.parent.textBetween($from.parentOffset, Math.min($from.parent.content.size, $from.parentOffset + MAX_REGEX_MATCH), undefined, leafNodeReplacementCharacter);
|
|
47
47
|
isBackwardMatch = true;
|
|
48
|
+
var backwardMatchRules = rules.filter(function (rule) {
|
|
49
|
+
return rule.allowsBackwardMatch;
|
|
50
|
+
});
|
|
48
51
|
result = findMatchOnRules({
|
|
49
|
-
rules:
|
|
52
|
+
rules: backwardMatchRules,
|
|
50
53
|
textToMatch: textAfter,
|
|
51
54
|
from: from,
|
|
52
55
|
to: to,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/prosemirror-input-rules",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.6",
|
|
4
4
|
"description": "A package that contains helpers to create autoformatting rules for ProseMirror",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
31
31
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
32
|
-
"@atlaskit/tmp-editor-statsig": "^14.
|
|
32
|
+
"@atlaskit/tmp-editor-statsig": "^14.7.0",
|
|
33
33
|
"@babel/runtime": "^7.0.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@atlaskit/editor-common": "^110.
|
|
36
|
+
"@atlaskit/editor-common": "^110.39.0"
|
|
37
37
|
},
|
|
38
38
|
"techstack": {
|
|
39
39
|
"@atlassian/frontend": {
|