@atlaskit/editor-plugin-hyperlink 14.0.10 → 14.0.12
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
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-hyperlink
|
|
2
2
|
|
|
3
|
+
## 14.0.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`346f91cfe1997`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/346f91cfe1997) -
|
|
8
|
+
Clean up prefer static regex violations
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 14.0.11
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 14.0.10
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -14,6 +14,10 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
|
14
14
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
15
15
|
var _prosemirrorInputRules = require("@atlaskit/prosemirror-input-rules");
|
|
16
16
|
var _toolbarButtons = require("./toolbar-buttons");
|
|
17
|
+
// [something](link) should convert to a hyperlink
|
|
18
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
19
|
+
var MARKDOWN_LINK_RULE_REGEX = /(^|[^!])\[(.*?)\]\((\S+)\)$/;
|
|
20
|
+
|
|
17
21
|
/**
|
|
18
22
|
* Called when space after link, but not on enter
|
|
19
23
|
*/
|
|
@@ -85,10 +89,7 @@ function createInputRulePlugin(schema, editorAnalyticsApi) {
|
|
|
85
89
|
return;
|
|
86
90
|
}
|
|
87
91
|
var urlWithASpaceRule = createLinkInputRule(_utils.LinkMatcher.create(), editorAnalyticsApi);
|
|
88
|
-
|
|
89
|
-
// [something](link) should convert to a hyperlink
|
|
90
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
91
|
-
var markdownLinkRule = (0, _utils.createRule)(/(^|[^!])\[(.*?)\]\((\S+)\)$/, function (state, match, start, end) {
|
|
92
|
+
var markdownLinkRule = (0, _utils.createRule)(MARKDOWN_LINK_RULE_REGEX, function (state, match, start, end) {
|
|
92
93
|
var _toolbarKey$getState$2, _toolbarKey$getState2;
|
|
93
94
|
var schema = state.schema;
|
|
94
95
|
var _match = (0, _slicedToArray2.default)(match, 4),
|
|
@@ -5,6 +5,10 @@ import { createRule, findFilepaths, getLinkCreationAnalyticsEvent, isLinkInMatch
|
|
|
5
5
|
import { createPlugin } from '@atlaskit/prosemirror-input-rules';
|
|
6
6
|
import { toolbarKey } from './toolbar-buttons';
|
|
7
7
|
|
|
8
|
+
// [something](link) should convert to a hyperlink
|
|
9
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
10
|
+
const MARKDOWN_LINK_RULE_REGEX = /(^|[^!])\[(.*?)\]\((\S+)\)$/;
|
|
11
|
+
|
|
8
12
|
/**
|
|
9
13
|
* Called when space after link, but not on enter
|
|
10
14
|
*/
|
|
@@ -77,10 +81,7 @@ export function createInputRulePlugin(schema, editorAnalyticsApi, autoLinkOnBlur
|
|
|
77
81
|
return;
|
|
78
82
|
}
|
|
79
83
|
const urlWithASpaceRule = createLinkInputRule(LinkMatcher.create(), editorAnalyticsApi);
|
|
80
|
-
|
|
81
|
-
// [something](link) should convert to a hyperlink
|
|
82
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
83
|
-
const markdownLinkRule = createRule(/(^|[^!])\[(.*?)\]\((\S+)\)$/, (state, match, start, end) => {
|
|
84
|
+
const markdownLinkRule = createRule(MARKDOWN_LINK_RULE_REGEX, (state, match, start, end) => {
|
|
84
85
|
var _toolbarKey$getState$2, _toolbarKey$getState2;
|
|
85
86
|
const {
|
|
86
87
|
schema
|
|
@@ -6,6 +6,10 @@ import { createRule, findFilepaths, getLinkCreationAnalyticsEvent, isLinkInMatch
|
|
|
6
6
|
import { createPlugin } from '@atlaskit/prosemirror-input-rules';
|
|
7
7
|
import { toolbarKey } from './toolbar-buttons';
|
|
8
8
|
|
|
9
|
+
// [something](link) should convert to a hyperlink
|
|
10
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
11
|
+
var MARKDOWN_LINK_RULE_REGEX = /(^|[^!])\[(.*?)\]\((\S+)\)$/;
|
|
12
|
+
|
|
9
13
|
/**
|
|
10
14
|
* Called when space after link, but not on enter
|
|
11
15
|
*/
|
|
@@ -77,10 +81,7 @@ export function createInputRulePlugin(schema, editorAnalyticsApi) {
|
|
|
77
81
|
return;
|
|
78
82
|
}
|
|
79
83
|
var urlWithASpaceRule = createLinkInputRule(LinkMatcher.create(), editorAnalyticsApi);
|
|
80
|
-
|
|
81
|
-
// [something](link) should convert to a hyperlink
|
|
82
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
83
|
-
var markdownLinkRule = createRule(/(^|[^!])\[(.*?)\]\((\S+)\)$/, function (state, match, start, end) {
|
|
84
|
+
var markdownLinkRule = createRule(MARKDOWN_LINK_RULE_REGEX, function (state, match, start, end) {
|
|
84
85
|
var _toolbarKey$getState$2, _toolbarKey$getState2;
|
|
85
86
|
var schema = state.schema;
|
|
86
87
|
var _match = _slicedToArray(match, 4),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-hyperlink",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.12",
|
|
4
4
|
"description": "Hyperlink plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"atlaskit:src": "src/index.ts",
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@atlaskit/adf-schema": "^56.0.0",
|
|
25
|
-
"@atlaskit/analytics-next": "^12.
|
|
25
|
+
"@atlaskit/analytics-next": "^12.1.0",
|
|
26
26
|
"@atlaskit/editor-plugin-analytics": "^12.0.0",
|
|
27
27
|
"@atlaskit/editor-plugin-card": "^18.0.0",
|
|
28
28
|
"@atlaskit/editor-plugin-connectivity": "^12.0.0",
|
|
@@ -32,18 +32,18 @@
|
|
|
32
32
|
"@atlaskit/editor-plugin-toolbar": "^9.0.0",
|
|
33
33
|
"@atlaskit/editor-plugin-user-intent": "^10.0.0",
|
|
34
34
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
35
|
-
"@atlaskit/editor-toolbar": "^2.
|
|
36
|
-
"@atlaskit/editor-toolbar-model": "^1.
|
|
37
|
-
"@atlaskit/icon": "^36.
|
|
35
|
+
"@atlaskit/editor-toolbar": "^2.1.0",
|
|
36
|
+
"@atlaskit/editor-toolbar-model": "^1.1.0",
|
|
37
|
+
"@atlaskit/icon": "^36.1.0",
|
|
38
38
|
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
39
39
|
"@atlaskit/prosemirror-input-rules": "^4.0.0",
|
|
40
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
40
|
+
"@atlaskit/tmp-editor-statsig": "^114.4.0",
|
|
41
41
|
"@babel/runtime": "^7.0.0",
|
|
42
42
|
"@emotion/react": "^11.7.1",
|
|
43
43
|
"uuid": "^3.1.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"@atlaskit/editor-common": "^116.
|
|
46
|
+
"@atlaskit/editor-common": "^116.17.0",
|
|
47
47
|
"react": "^18.2.0",
|
|
48
48
|
"react-dom": "^18.2.0",
|
|
49
49
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|