@atlaskit/editor-plugin-paste 30.0.4 → 30.0.5

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,13 @@
1
1
  # @atlaskit/editor-plugin-paste
2
2
 
3
+ ## 30.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`ca7b9d268d51a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ca7b9d268d51a) -
8
+ Clean up platform_editor_gfm_link_paste_fix, retaining bare URL link detection during GFM markdown
9
+ paste.
10
+
3
11
  ## 30.0.4
4
12
 
5
13
  ### Patch Changes
@@ -102,7 +102,7 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
102
102
  var atlassianMarkDownParser = new _editorMarkdownTransformer.MarkdownTransformer(schema, _md.md);
103
103
  function getMarkdownSlice(text, openStart, openEnd) {
104
104
  if (markdownToPmConverter && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_paste_as_md_use_gfm')) {
105
- return (0, _getMarkdownSlice.getMarkdownSliceViaGfm)(text, schema, openStart, openEnd, markdownToPmConverter, (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_gfm_link_paste_fix'));
105
+ return (0, _getMarkdownSlice.getMarkdownSliceViaGfm)(text, schema, openStart, openEnd, markdownToPmConverter);
106
106
  }
107
107
  var escapedTextInput = (0, _util.escapeBackslashAndLinksExceptCodeBlock)(text);
108
108
  var doc = atlassianMarkDownParser.parse(escapedTextInput);
@@ -15,15 +15,12 @@ var _index = require("./index");
15
15
  * throws or produces an empty document — the caller will propagate `undefined`
16
16
  * without falling back to the legacy MarkdownTransformer.
17
17
  */
18
- function getMarkdownSliceViaGfm(text, schema, openStart, openEnd, markdownToPmConverter, wrapBareUrls) {
18
+ function getMarkdownSliceViaGfm(text, schema, openStart, openEnd, markdownToPmConverter) {
19
19
  // The injected GFM converter enables tables, task lists, and strikethrough
20
- // individually, but does not enable the GFM autolink-literal extension. In
21
- // the treatment, wrap bare URLs in CommonMark autolink syntax so the card
22
- // plugin receives a link mark to resolve. Preserve the current behavior in
23
- // control while the fix rolls out.
24
- var escapedTextInput = (0, _index.escapeBackslashAndLinksExceptCodeBlock)(text, {
25
- skipLinkEscaping: !wrapBareUrls
26
- });
20
+ // individually, but does not enable the GFM autolink-literal extension.
21
+ // Wrap bare URLs in CommonMark autolink syntax so the card plugin receives
22
+ // a link mark to resolve.
23
+ var escapedTextInput = (0, _index.escapeBackslashAndLinksExceptCodeBlock)(text);
27
24
  try {
28
25
  var doc = schema.nodes.doc.createAndFill({}, markdownToPmConverter({
29
26
  markdown: escapedTextInput,
@@ -91,7 +91,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
91
91
  const atlassianMarkDownParser = new MarkdownTransformer(schema, md);
92
92
  function getMarkdownSlice(text, openStart, openEnd) {
93
93
  if (markdownToPmConverter && isExperimentEnabled('platform_editor_paste_as_md_use_gfm')) {
94
- return getMarkdownSliceViaGfm(text, schema, openStart, openEnd, markdownToPmConverter, isExperimentEnabled('platform_editor_gfm_link_paste_fix'));
94
+ return getMarkdownSliceViaGfm(text, schema, openStart, openEnd, markdownToPmConverter);
95
95
  }
96
96
  const escapedTextInput = escapeBackslashAndLinksExceptCodeBlock(text);
97
97
  const doc = atlassianMarkDownParser.parse(escapedTextInput);
@@ -10,15 +10,12 @@ import { escapeBackslashAndLinksExceptCodeBlock } from './index';
10
10
  * throws or produces an empty document — the caller will propagate `undefined`
11
11
  * without falling back to the legacy MarkdownTransformer.
12
12
  */
13
- export function getMarkdownSliceViaGfm(text, schema, openStart, openEnd, markdownToPmConverter, wrapBareUrls) {
13
+ export function getMarkdownSliceViaGfm(text, schema, openStart, openEnd, markdownToPmConverter) {
14
14
  // The injected GFM converter enables tables, task lists, and strikethrough
15
- // individually, but does not enable the GFM autolink-literal extension. In
16
- // the treatment, wrap bare URLs in CommonMark autolink syntax so the card
17
- // plugin receives a link mark to resolve. Preserve the current behavior in
18
- // control while the fix rolls out.
19
- const escapedTextInput = escapeBackslashAndLinksExceptCodeBlock(text, {
20
- skipLinkEscaping: !wrapBareUrls
21
- });
15
+ // individually, but does not enable the GFM autolink-literal extension.
16
+ // Wrap bare URLs in CommonMark autolink syntax so the card plugin receives
17
+ // a link mark to resolve.
18
+ const escapedTextInput = escapeBackslashAndLinksExceptCodeBlock(text);
22
19
  try {
23
20
  const doc = schema.nodes.doc.createAndFill({}, markdownToPmConverter({
24
21
  markdown: escapedTextInput,
@@ -94,7 +94,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
94
94
  var atlassianMarkDownParser = new MarkdownTransformer(schema, md);
95
95
  function getMarkdownSlice(text, openStart, openEnd) {
96
96
  if (markdownToPmConverter && isExperimentEnabled('platform_editor_paste_as_md_use_gfm')) {
97
- return getMarkdownSliceViaGfm(text, schema, openStart, openEnd, markdownToPmConverter, isExperimentEnabled('platform_editor_gfm_link_paste_fix'));
97
+ return getMarkdownSliceViaGfm(text, schema, openStart, openEnd, markdownToPmConverter);
98
98
  }
99
99
  var escapedTextInput = escapeBackslashAndLinksExceptCodeBlock(text);
100
100
  var doc = atlassianMarkDownParser.parse(escapedTextInput);
@@ -10,15 +10,12 @@ import { escapeBackslashAndLinksExceptCodeBlock } from './index';
10
10
  * throws or produces an empty document — the caller will propagate `undefined`
11
11
  * without falling back to the legacy MarkdownTransformer.
12
12
  */
13
- export function getMarkdownSliceViaGfm(text, schema, openStart, openEnd, markdownToPmConverter, wrapBareUrls) {
13
+ export function getMarkdownSliceViaGfm(text, schema, openStart, openEnd, markdownToPmConverter) {
14
14
  // The injected GFM converter enables tables, task lists, and strikethrough
15
- // individually, but does not enable the GFM autolink-literal extension. In
16
- // the treatment, wrap bare URLs in CommonMark autolink syntax so the card
17
- // plugin receives a link mark to resolve. Preserve the current behavior in
18
- // control while the fix rolls out.
19
- var escapedTextInput = escapeBackslashAndLinksExceptCodeBlock(text, {
20
- skipLinkEscaping: !wrapBareUrls
21
- });
15
+ // individually, but does not enable the GFM autolink-literal extension.
16
+ // Wrap bare URLs in CommonMark autolink syntax so the card plugin receives
17
+ // a link mark to resolve.
18
+ var escapedTextInput = escapeBackslashAndLinksExceptCodeBlock(text);
22
19
  try {
23
20
  var doc = schema.nodes.doc.createAndFill({}, markdownToPmConverter({
24
21
  markdown: escapedTextInput,
@@ -11,4 +11,4 @@ import { Slice } from '@atlaskit/editor-prosemirror/model';
11
11
  export declare function getMarkdownSliceViaGfm(text: string, schema: Schema, openStart: number, openEnd: number, markdownToPmConverter: (params: {
12
12
  markdown: string;
13
13
  schema: Schema;
14
- }) => Fragment, wrapBareUrls: boolean): Slice | undefined;
14
+ }) => Fragment): Slice | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-paste",
3
- "version": "30.0.4",
3
+ "version": "30.0.5",
4
4
  "description": "Paste plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -24,9 +24,9 @@
24
24
  "@atlaskit/code": "^20.0.0",
25
25
  "@atlaskit/editor-markdown-transformer": "^6.3.0",
26
26
  "@atlaskit/editor-plugin-analytics": "^29.0.0",
27
- "@atlaskit/editor-plugin-annotation": "^29.0.0",
27
+ "@atlaskit/editor-plugin-annotation": "^29.2.0",
28
28
  "@atlaskit/editor-plugin-better-type-history": "^29.0.0",
29
- "@atlaskit/editor-plugin-card": "^35.1.0",
29
+ "@atlaskit/editor-plugin-card": "^35.2.0",
30
30
  "@atlaskit/editor-plugin-expand": "^30.0.0",
31
31
  "@atlaskit/editor-plugin-extension": "^32.0.0",
32
32
  "@atlaskit/editor-plugin-feature-flags": "^28.0.0",
@@ -44,14 +44,14 @@
44
44
  "@atlaskit/platform-feature-experiments": "^0.3.0",
45
45
  "@atlaskit/platform-feature-flags": "^2.2.0",
46
46
  "@atlaskit/prosemirror-history": "^1.3.0",
47
- "@atlaskit/tmp-editor-statsig": "^246.0.0",
48
- "@atlaskit/tokens": "^20.7.0",
47
+ "@atlaskit/tmp-editor-statsig": "^246.1.0",
48
+ "@atlaskit/tokens": "^20.8.0",
49
49
  "@babel/runtime": "^7.0.0",
50
50
  "lodash": "^4.17.21",
51
51
  "uuid": "^11.1.1"
52
52
  },
53
53
  "peerDependencies": {
54
- "@atlaskit/editor-common": "^133.6.0",
54
+ "@atlaskit/editor-common": "^133.7.0",
55
55
  "react": "^18.2.0 || ^19.2.0",
56
56
  "react-dom": "^18.2.0 || ^19.2.0",
57
57
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"