@atlaskit/editor-wikimarkup-transformer 11.0.8 → 11.0.11
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 +19 -0
- package/dist/cjs/encoder/nodes/text.js +10 -1
- package/dist/cjs/parser/tokenize/citation.js +6 -2
- package/dist/cjs/parser/tokenize/deleted.js +6 -2
- package/dist/cjs/parser/tokenize/emphasis.js +6 -2
- package/dist/cjs/parser/tokenize/inserted.js +6 -2
- package/dist/cjs/parser/tokenize/keyword.js +10 -0
- package/dist/cjs/parser/tokenize/monospace.js +10 -4
- package/dist/cjs/parser/tokenize/strong.js +6 -2
- package/dist/cjs/parser/tokenize/subscript.js +6 -2
- package/dist/cjs/parser/tokenize/superscript.js +6 -2
- package/dist/cjs/parser/utils/text.js +18 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/encoder/nodes/text.js +3 -1
- package/dist/es2019/parser/tokenize/citation.js +7 -3
- package/dist/es2019/parser/tokenize/deleted.js +7 -3
- package/dist/es2019/parser/tokenize/emphasis.js +7 -3
- package/dist/es2019/parser/tokenize/inserted.js +7 -3
- package/dist/es2019/parser/tokenize/keyword.js +9 -1
- package/dist/es2019/parser/tokenize/monospace.js +7 -2
- package/dist/es2019/parser/tokenize/strong.js +7 -3
- package/dist/es2019/parser/tokenize/subscript.js +7 -3
- package/dist/es2019/parser/tokenize/superscript.js +7 -3
- package/dist/es2019/parser/utils/text.js +14 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/encoder/nodes/text.js +6 -1
- package/dist/esm/parser/tokenize/citation.js +7 -3
- package/dist/esm/parser/tokenize/deleted.js +7 -3
- package/dist/esm/parser/tokenize/emphasis.js +7 -3
- package/dist/esm/parser/tokenize/inserted.js +7 -3
- package/dist/esm/parser/tokenize/keyword.js +9 -1
- package/dist/esm/parser/tokenize/monospace.js +7 -2
- package/dist/esm/parser/tokenize/strong.js +7 -3
- package/dist/esm/parser/tokenize/subscript.js +7 -3
- package/dist/esm/parser/tokenize/superscript.js +7 -3
- package/dist/esm/parser/utils/text.js +14 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/parser/tokenize/keyword.d.ts +6 -0
- package/dist/types/parser/utils/text.d.ts +4 -0
- package/package.json +8 -8
- package/report.api.md +21 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/editor-wikimarkup-transformer
|
|
2
2
|
|
|
3
|
+
## 11.0.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`31ea1d0b1f8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/31ea1d0b1f8) - Escape opening braces for only macro keywords
|
|
8
|
+
|
|
9
|
+
## 11.0.10
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`c0315117480`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c0315117480) - ESS-2375 Text effects should support surrounding curly braces
|
|
14
|
+
|
|
15
|
+
## 11.0.9
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`daa1dac9961`](https://bitbucket.org/atlassian/atlassian-frontend/commits/daa1dac9961) - Update the @atlaskit/editor-wikimarkup-transformer to use emotion instead of styled and also updated the dependencies
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 11.0.8
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports.text = void 0;
|
|
7
9
|
|
|
10
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
11
|
+
|
|
12
|
+
var _keyword = require("../../parser/tokenize/keyword");
|
|
13
|
+
|
|
8
14
|
var _code = require("../marks/code");
|
|
9
15
|
|
|
10
16
|
var _color = require("../marks/color");
|
|
@@ -44,7 +50,10 @@ var isEscapeNeeded = function isEscapeNeeded(node, parent) {
|
|
|
44
50
|
};
|
|
45
51
|
|
|
46
52
|
function escapingWikiFormatter(text) {
|
|
47
|
-
|
|
53
|
+
var pattern = ['([\\![])'].concat((0, _toConsumableArray2.default)(_keyword.macroKeywordTokenMap.map(function (macro) {
|
|
54
|
+
return "(".concat(macro.regex.source.replace('^', ''), ")");
|
|
55
|
+
}))).join('|');
|
|
56
|
+
return text.replace(new RegExp(pattern, 'g'), '\\$&');
|
|
48
57
|
}
|
|
49
58
|
|
|
50
59
|
var text = function text(node) {
|
|
@@ -60,9 +60,13 @@ var citation = function citation(_ref) {
|
|
|
60
60
|
};
|
|
61
61
|
};
|
|
62
62
|
|
|
63
|
+
var _getSurroundingSymbol = (0, _text.getSurroundingSymbols)(input.substring(position), '??', '??'),
|
|
64
|
+
openingSymbol = _getSurroundingSymbol.openingSymbol,
|
|
65
|
+
closingSymbol = _getSurroundingSymbol.closingSymbol;
|
|
66
|
+
|
|
63
67
|
return (0, _commonFormatter.commonFormatter)(input, position, schema, {
|
|
64
|
-
opening:
|
|
65
|
-
closing:
|
|
68
|
+
opening: openingSymbol,
|
|
69
|
+
closing: closingSymbol,
|
|
66
70
|
context: context,
|
|
67
71
|
rawContentProcessor: rawContentProcessor
|
|
68
72
|
});
|
|
@@ -55,9 +55,13 @@ var deleted = function deleted(_ref) {
|
|
|
55
55
|
};
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
+
var _getSurroundingSymbol = (0, _text.getSurroundingSymbols)(input.substring(position), '-', '-'),
|
|
59
|
+
openingSymbol = _getSurroundingSymbol.openingSymbol,
|
|
60
|
+
closingSymbol = _getSurroundingSymbol.closingSymbol;
|
|
61
|
+
|
|
58
62
|
return (0, _commonFormatter.commonFormatter)(input, position, schema, {
|
|
59
|
-
opening:
|
|
60
|
-
closing:
|
|
63
|
+
opening: openingSymbol,
|
|
64
|
+
closing: closingSymbol,
|
|
61
65
|
context: context,
|
|
62
66
|
rawContentProcessor: rawContentProcessor
|
|
63
67
|
});
|
|
@@ -54,9 +54,13 @@ var emphasis = function emphasis(_ref) {
|
|
|
54
54
|
};
|
|
55
55
|
};
|
|
56
56
|
|
|
57
|
+
var _getSurroundingSymbol = (0, _text.getSurroundingSymbols)(input.substring(position), '_', '_'),
|
|
58
|
+
openingSymbol = _getSurroundingSymbol.openingSymbol,
|
|
59
|
+
closingSymbol = _getSurroundingSymbol.closingSymbol;
|
|
60
|
+
|
|
57
61
|
return (0, _commonFormatter.commonFormatter)(input, position, schema, {
|
|
58
|
-
opening:
|
|
59
|
-
closing:
|
|
62
|
+
opening: openingSymbol,
|
|
63
|
+
closing: closingSymbol,
|
|
60
64
|
context: context,
|
|
61
65
|
rawContentProcessor: rawContentProcessor
|
|
62
66
|
});
|
|
@@ -54,9 +54,13 @@ var inserted = function inserted(_ref) {
|
|
|
54
54
|
};
|
|
55
55
|
};
|
|
56
56
|
|
|
57
|
+
var _getSurroundingSymbol = (0, _text.getSurroundingSymbols)(input.substring(position), '+', '+'),
|
|
58
|
+
openingSymbol = _getSurroundingSymbol.openingSymbol,
|
|
59
|
+
closingSymbol = _getSurroundingSymbol.closingSymbol;
|
|
60
|
+
|
|
57
61
|
return (0, _commonFormatter.commonFormatter)(input, position, schema, {
|
|
58
|
-
opening:
|
|
59
|
-
closing:
|
|
62
|
+
opening: openingSymbol,
|
|
63
|
+
closing: closingSymbol,
|
|
60
64
|
context: context,
|
|
61
65
|
rawContentProcessor: rawContentProcessor
|
|
62
66
|
});
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.macroKeywordTokenMap = void 0;
|
|
6
7
|
exports.parseIssueKeyword = parseIssueKeyword;
|
|
7
8
|
exports.parseLeadingKeyword = parseLeadingKeyword;
|
|
8
9
|
exports.parseMacroKeyword = parseMacroKeyword;
|
|
@@ -42,6 +43,7 @@ var macroKeywordTokenMap = [{
|
|
|
42
43
|
* will be checked first, so it matters.
|
|
43
44
|
*/
|
|
44
45
|
|
|
46
|
+
exports.macroKeywordTokenMap = macroKeywordTokenMap;
|
|
45
47
|
var keywordTokenMap = {
|
|
46
48
|
'[': _.TokenType.LINK_FORMAT,
|
|
47
49
|
http: _.TokenType.LINK_TEXT,
|
|
@@ -56,6 +58,14 @@ var keywordTokenMap = {
|
|
|
56
58
|
'----': _.TokenType.QUADRUPLE_DASH_SYMBOL,
|
|
57
59
|
'---': _.TokenType.TRIPLE_DASH_SYMBOL,
|
|
58
60
|
'--': _.TokenType.DOUBLE_DASH_SYMBOL,
|
|
61
|
+
'{-}': _.TokenType.DELETED,
|
|
62
|
+
'{+}': _.TokenType.INSERTED,
|
|
63
|
+
'{*}': _.TokenType.STRONG,
|
|
64
|
+
'{^}': _.TokenType.SUPERSCRIPT,
|
|
65
|
+
'{~}': _.TokenType.SUBSCRIPT,
|
|
66
|
+
'{_}': _.TokenType.EMPHASIS,
|
|
67
|
+
'{{{}': _.TokenType.MONOSPACE,
|
|
68
|
+
'{??}': _.TokenType.CITATION,
|
|
59
69
|
'-': _.TokenType.DELETED,
|
|
60
70
|
'+': _.TokenType.INSERTED,
|
|
61
71
|
'*': _.TokenType.STRONG,
|
|
@@ -7,9 +7,11 @@ exports.monospace = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _ = require("./");
|
|
9
9
|
|
|
10
|
+
var _text = require("../utils/text");
|
|
11
|
+
|
|
10
12
|
var _commonFormatter = require("./common-formatter");
|
|
11
13
|
|
|
12
|
-
var
|
|
14
|
+
var _text2 = require("../text");
|
|
13
15
|
|
|
14
16
|
var monospace = function monospace(_ref) {
|
|
15
17
|
var input = _ref.input,
|
|
@@ -34,7 +36,7 @@ var monospace = function monospace(_ref) {
|
|
|
34
36
|
};
|
|
35
37
|
|
|
36
38
|
var rawContentProcessor = function rawContentProcessor(raw, length) {
|
|
37
|
-
var content = (0,
|
|
39
|
+
var content = (0, _text2.parseString)({
|
|
38
40
|
ignoreTokenTypes: ignoreTokenTypes,
|
|
39
41
|
schema: schema,
|
|
40
42
|
context: context,
|
|
@@ -48,9 +50,13 @@ var monospace = function monospace(_ref) {
|
|
|
48
50
|
};
|
|
49
51
|
};
|
|
50
52
|
|
|
53
|
+
var _getSurroundingSymbol = (0, _text.getSurroundingSymbols)(input.substring(position), '{{', '}}'),
|
|
54
|
+
openingSymbol = _getSurroundingSymbol.openingSymbol,
|
|
55
|
+
closingSymbol = _getSurroundingSymbol.closingSymbol;
|
|
56
|
+
|
|
51
57
|
return (0, _commonFormatter.commonFormatter)(input, position, schema, {
|
|
52
|
-
opening:
|
|
53
|
-
closing:
|
|
58
|
+
opening: openingSymbol,
|
|
59
|
+
closing: closingSymbol,
|
|
54
60
|
context: context,
|
|
55
61
|
rawContentProcessor: rawContentProcessor
|
|
56
62
|
});
|
|
@@ -54,9 +54,13 @@ var strong = function strong(_ref) {
|
|
|
54
54
|
};
|
|
55
55
|
};
|
|
56
56
|
|
|
57
|
+
var _getSurroundingSymbol = (0, _text.getSurroundingSymbols)(input.substring(position), '*', '*'),
|
|
58
|
+
openingSymbol = _getSurroundingSymbol.openingSymbol,
|
|
59
|
+
closingSymbol = _getSurroundingSymbol.closingSymbol;
|
|
60
|
+
|
|
57
61
|
return (0, _commonFormatter.commonFormatter)(input, position, schema, {
|
|
58
|
-
opening:
|
|
59
|
-
closing:
|
|
62
|
+
opening: openingSymbol,
|
|
63
|
+
closing: closingSymbol,
|
|
60
64
|
context: context,
|
|
61
65
|
rawContentProcessor: rawContentProcessor
|
|
62
66
|
});
|
|
@@ -56,9 +56,13 @@ var subscript = function subscript(_ref) {
|
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
58
|
|
|
59
|
+
var _getSurroundingSymbol = (0, _text.getSurroundingSymbols)(input.substring(position), '~', '~'),
|
|
60
|
+
openingSymbol = _getSurroundingSymbol.openingSymbol,
|
|
61
|
+
closingSymbol = _getSurroundingSymbol.closingSymbol;
|
|
62
|
+
|
|
59
63
|
return (0, _commonFormatter.commonFormatter)(input, position, schema, {
|
|
60
|
-
opening:
|
|
61
|
-
closing:
|
|
64
|
+
opening: openingSymbol,
|
|
65
|
+
closing: closingSymbol,
|
|
62
66
|
context: context,
|
|
63
67
|
rawContentProcessor: rawContentProcessor
|
|
64
68
|
});
|
|
@@ -56,9 +56,13 @@ var superscript = function superscript(_ref) {
|
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
58
|
|
|
59
|
+
var _getSurroundingSymbol = (0, _text.getSurroundingSymbols)(input.substring(position), '^', '^'),
|
|
60
|
+
openingSymbol = _getSurroundingSymbol.openingSymbol,
|
|
61
|
+
closingSymbol = _getSurroundingSymbol.closingSymbol;
|
|
62
|
+
|
|
59
63
|
return (0, _commonFormatter.commonFormatter)(input, position, schema, {
|
|
60
|
-
opening:
|
|
61
|
-
closing:
|
|
64
|
+
opening: openingSymbol,
|
|
65
|
+
closing: closingSymbol,
|
|
62
66
|
context: context,
|
|
63
67
|
rawContentProcessor: rawContentProcessor
|
|
64
68
|
});
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.StringBuffer = void 0;
|
|
8
|
+
exports.getSurroundingSymbols = exports.StringBuffer = void 0;
|
|
9
9
|
exports.hasAnyOfMarks = hasAnyOfMarks;
|
|
10
10
|
exports.isBlank = isBlank;
|
|
11
11
|
exports.isDigit = isDigit;
|
|
@@ -36,8 +36,24 @@ function isBlank(value) {
|
|
|
36
36
|
|
|
37
37
|
function isNotBlank(value) {
|
|
38
38
|
return !isBlank(value);
|
|
39
|
-
}
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* ESS-2375 Returns the beginning and closing symbol to parse a token
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
var getSurroundingSymbols = function getSurroundingSymbols(trimmedInput, openingText, closingText) {
|
|
46
|
+
var openingSymbol = trimmedInput.startsWith("{".concat(openingText, "}")) ? "{".concat(openingText, "}") : openingText;
|
|
47
|
+
var endIndex = trimmedInput.indexOf(closingText, openingSymbol === "{".concat(openingText, "}") ? openingText.length + 2 : openingText.length);
|
|
48
|
+
var closingSymbol = endIndex > -1 && trimmedInput.charAt(endIndex - 1) === '{' && trimmedInput.charAt(endIndex + closingText.length) === '}' ? "{".concat(closingText, "}") : closingText;
|
|
49
|
+
return {
|
|
50
|
+
openingSymbol: openingSymbol,
|
|
51
|
+
closingSymbol: closingSymbol
|
|
52
|
+
};
|
|
53
|
+
}; // TODO This is using strings which makes it potentially a performance bottleneck
|
|
54
|
+
|
|
40
55
|
|
|
56
|
+
exports.getSurroundingSymbols = getSurroundingSymbols;
|
|
41
57
|
|
|
42
58
|
var StringBuffer = /*#__PURE__*/function () {
|
|
43
59
|
function StringBuffer() {
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { macroKeywordTokenMap } from '../../parser/tokenize/keyword';
|
|
1
2
|
import { code } from '../marks/code';
|
|
2
3
|
import { textColor } from '../marks/color';
|
|
3
4
|
import { em } from '../marks/em';
|
|
@@ -28,7 +29,8 @@ const isEscapeNeeded = (node, parent) => {
|
|
|
28
29
|
};
|
|
29
30
|
|
|
30
31
|
function escapingWikiFormatter(text) {
|
|
31
|
-
|
|
32
|
+
const pattern = ['([\\![])', ...macroKeywordTokenMap.map(macro => `(${macro.regex.source.replace('^', '')})`)].join('|');
|
|
33
|
+
return text.replace(new RegExp(pattern, 'g'), '\\$&');
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
export const text = (node, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TokenType } from './';
|
|
2
|
-
import { hasAnyOfMarks } from '../utils/text';
|
|
2
|
+
import { hasAnyOfMarks, getSurroundingSymbols } from '../utils/text';
|
|
3
3
|
import { commonFormatter } from './common-formatter';
|
|
4
4
|
import { parseString } from '../text';
|
|
5
5
|
import { EM_DASH } from '../../char';
|
|
@@ -44,9 +44,13 @@ export const citation = ({
|
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
+
const {
|
|
48
|
+
openingSymbol,
|
|
49
|
+
closingSymbol
|
|
50
|
+
} = getSurroundingSymbols(input.substring(position), '??', '??');
|
|
47
51
|
return commonFormatter(input, position, schema, {
|
|
48
|
-
opening:
|
|
49
|
-
closing:
|
|
52
|
+
opening: openingSymbol,
|
|
53
|
+
closing: closingSymbol,
|
|
50
54
|
context,
|
|
51
55
|
rawContentProcessor
|
|
52
56
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TokenType } from './';
|
|
2
|
-
import { hasAnyOfMarks } from '../utils/text';
|
|
2
|
+
import { hasAnyOfMarks, getSurroundingSymbols } from '../utils/text';
|
|
3
3
|
import { commonFormatter } from './common-formatter';
|
|
4
4
|
import { parseString } from '../text';
|
|
5
5
|
export const deleted = ({
|
|
@@ -40,9 +40,13 @@ export const deleted = ({
|
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
42
|
|
|
43
|
+
const {
|
|
44
|
+
openingSymbol,
|
|
45
|
+
closingSymbol
|
|
46
|
+
} = getSurroundingSymbols(input.substring(position), '-', '-');
|
|
43
47
|
return commonFormatter(input, position, schema, {
|
|
44
|
-
opening:
|
|
45
|
-
closing:
|
|
48
|
+
opening: openingSymbol,
|
|
49
|
+
closing: closingSymbol,
|
|
46
50
|
context,
|
|
47
51
|
rawContentProcessor
|
|
48
52
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TokenType } from './';
|
|
2
|
-
import { hasAnyOfMarks } from '../utils/text';
|
|
2
|
+
import { hasAnyOfMarks, getSurroundingSymbols } from '../utils/text';
|
|
3
3
|
import { commonFormatter } from './common-formatter';
|
|
4
4
|
import { parseString } from '../text';
|
|
5
5
|
export const emphasis = ({
|
|
@@ -39,9 +39,13 @@ export const emphasis = ({
|
|
|
39
39
|
};
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
+
const {
|
|
43
|
+
openingSymbol,
|
|
44
|
+
closingSymbol
|
|
45
|
+
} = getSurroundingSymbols(input.substring(position), '_', '_');
|
|
42
46
|
return commonFormatter(input, position, schema, {
|
|
43
|
-
opening:
|
|
44
|
-
closing:
|
|
47
|
+
opening: openingSymbol,
|
|
48
|
+
closing: closingSymbol,
|
|
45
49
|
context,
|
|
46
50
|
rawContentProcessor
|
|
47
51
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TokenType } from './';
|
|
2
|
-
import { hasAnyOfMarks } from '../utils/text';
|
|
2
|
+
import { hasAnyOfMarks, getSurroundingSymbols } from '../utils/text';
|
|
3
3
|
import { commonFormatter } from './common-formatter';
|
|
4
4
|
import { parseString } from '../text';
|
|
5
5
|
export const inserted = ({
|
|
@@ -39,9 +39,13 @@ export const inserted = ({
|
|
|
39
39
|
};
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
+
const {
|
|
43
|
+
openingSymbol,
|
|
44
|
+
closingSymbol
|
|
45
|
+
} = getSurroundingSymbols(input.substring(position), '+', '+');
|
|
42
46
|
return commonFormatter(input, position, schema, {
|
|
43
|
-
opening:
|
|
44
|
-
closing:
|
|
47
|
+
opening: openingSymbol,
|
|
48
|
+
closing: closingSymbol,
|
|
45
49
|
context,
|
|
46
50
|
rawContentProcessor
|
|
47
51
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TokenType } from './';
|
|
2
2
|
import { MAX_LIST_DEPTH } from './list';
|
|
3
|
-
const macroKeywordTokenMap = [{
|
|
3
|
+
export const macroKeywordTokenMap = [{
|
|
4
4
|
type: TokenType.ADF_MACRO,
|
|
5
5
|
regex: /^{adf/i
|
|
6
6
|
}, {
|
|
@@ -44,6 +44,14 @@ const keywordTokenMap = {
|
|
|
44
44
|
'----': TokenType.QUADRUPLE_DASH_SYMBOL,
|
|
45
45
|
'---': TokenType.TRIPLE_DASH_SYMBOL,
|
|
46
46
|
'--': TokenType.DOUBLE_DASH_SYMBOL,
|
|
47
|
+
'{-}': TokenType.DELETED,
|
|
48
|
+
'{+}': TokenType.INSERTED,
|
|
49
|
+
'{*}': TokenType.STRONG,
|
|
50
|
+
'{^}': TokenType.SUPERSCRIPT,
|
|
51
|
+
'{~}': TokenType.SUBSCRIPT,
|
|
52
|
+
'{_}': TokenType.EMPHASIS,
|
|
53
|
+
'{{{}': TokenType.MONOSPACE,
|
|
54
|
+
'{??}': TokenType.CITATION,
|
|
47
55
|
'-': TokenType.DELETED,
|
|
48
56
|
'+': TokenType.INSERTED,
|
|
49
57
|
'*': TokenType.STRONG,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TokenType } from './';
|
|
2
|
+
import { getSurroundingSymbols } from '../utils/text';
|
|
2
3
|
import { commonFormatter } from './common-formatter';
|
|
3
4
|
import { parseString } from '../text';
|
|
4
5
|
export const monospace = ({
|
|
@@ -38,9 +39,13 @@ export const monospace = ({
|
|
|
38
39
|
};
|
|
39
40
|
};
|
|
40
41
|
|
|
42
|
+
const {
|
|
43
|
+
openingSymbol,
|
|
44
|
+
closingSymbol
|
|
45
|
+
} = getSurroundingSymbols(input.substring(position), '{{', '}}');
|
|
41
46
|
return commonFormatter(input, position, schema, {
|
|
42
|
-
opening:
|
|
43
|
-
closing:
|
|
47
|
+
opening: openingSymbol,
|
|
48
|
+
closing: closingSymbol,
|
|
44
49
|
context,
|
|
45
50
|
rawContentProcessor
|
|
46
51
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TokenType } from './';
|
|
2
|
-
import { hasAnyOfMarks } from '../utils/text';
|
|
2
|
+
import { hasAnyOfMarks, getSurroundingSymbols } from '../utils/text';
|
|
3
3
|
import { commonFormatter } from './common-formatter';
|
|
4
4
|
import { parseString } from '../text';
|
|
5
5
|
export const strong = ({
|
|
@@ -39,9 +39,13 @@ export const strong = ({
|
|
|
39
39
|
};
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
+
const {
|
|
43
|
+
openingSymbol,
|
|
44
|
+
closingSymbol
|
|
45
|
+
} = getSurroundingSymbols(input.substring(position), '*', '*');
|
|
42
46
|
return commonFormatter(input, position, schema, {
|
|
43
|
-
opening:
|
|
44
|
-
closing:
|
|
47
|
+
opening: openingSymbol,
|
|
48
|
+
closing: closingSymbol,
|
|
45
49
|
context,
|
|
46
50
|
rawContentProcessor
|
|
47
51
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TokenType } from './';
|
|
2
|
-
import { hasAnyOfMarks } from '../utils/text';
|
|
2
|
+
import { hasAnyOfMarks, getSurroundingSymbols } from '../utils/text';
|
|
3
3
|
import { commonFormatter } from './common-formatter';
|
|
4
4
|
import { parseString } from '../text';
|
|
5
5
|
export const subscript = ({
|
|
@@ -41,9 +41,13 @@ export const subscript = ({
|
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
+
const {
|
|
45
|
+
openingSymbol,
|
|
46
|
+
closingSymbol
|
|
47
|
+
} = getSurroundingSymbols(input.substring(position), '~', '~');
|
|
44
48
|
return commonFormatter(input, position, schema, {
|
|
45
|
-
opening:
|
|
46
|
-
closing:
|
|
49
|
+
opening: openingSymbol,
|
|
50
|
+
closing: closingSymbol,
|
|
47
51
|
context,
|
|
48
52
|
rawContentProcessor
|
|
49
53
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TokenType } from './';
|
|
2
|
-
import { hasAnyOfMarks } from '../utils/text';
|
|
2
|
+
import { hasAnyOfMarks, getSurroundingSymbols } from '../utils/text';
|
|
3
3
|
import { commonFormatter } from './common-formatter';
|
|
4
4
|
import { parseString } from '../text';
|
|
5
5
|
export const superscript = ({
|
|
@@ -41,9 +41,13 @@ export const superscript = ({
|
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
+
const {
|
|
45
|
+
openingSymbol,
|
|
46
|
+
closingSymbol
|
|
47
|
+
} = getSurroundingSymbols(input.substring(position), '^', '^');
|
|
44
48
|
return commonFormatter(input, position, schema, {
|
|
45
|
-
opening:
|
|
46
|
-
closing:
|
|
49
|
+
opening: openingSymbol,
|
|
50
|
+
closing: closingSymbol,
|
|
47
51
|
context,
|
|
48
52
|
rawContentProcessor
|
|
49
53
|
});
|
|
@@ -12,7 +12,20 @@ export function isBlank(value) {
|
|
|
12
12
|
}
|
|
13
13
|
export function isNotBlank(value) {
|
|
14
14
|
return !isBlank(value);
|
|
15
|
-
}
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* ESS-2375 Returns the beginning and closing symbol to parse a token
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
export const getSurroundingSymbols = (trimmedInput, openingText, closingText) => {
|
|
21
|
+
const openingSymbol = trimmedInput.startsWith(`{${openingText}}`) ? `{${openingText}}` : openingText;
|
|
22
|
+
const endIndex = trimmedInput.indexOf(closingText, openingSymbol === `{${openingText}}` ? openingText.length + 2 : openingText.length);
|
|
23
|
+
const closingSymbol = endIndex > -1 && trimmedInput.charAt(endIndex - 1) === '{' && trimmedInput.charAt(endIndex + closingText.length) === '}' ? `{${closingText}}` : closingText;
|
|
24
|
+
return {
|
|
25
|
+
openingSymbol,
|
|
26
|
+
closingSymbol
|
|
27
|
+
};
|
|
28
|
+
}; // TODO This is using strings which makes it potentially a performance bottleneck
|
|
16
29
|
|
|
17
30
|
export class StringBuffer {
|
|
18
31
|
constructor(buffer = '') {
|
package/dist/es2019/version.json
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
+
import { macroKeywordTokenMap } from '../../parser/tokenize/keyword';
|
|
1
3
|
import { code } from '../marks/code';
|
|
2
4
|
import { textColor } from '../marks/color';
|
|
3
5
|
import { em } from '../marks/em';
|
|
@@ -30,7 +32,10 @@ var isEscapeNeeded = function isEscapeNeeded(node, parent) {
|
|
|
30
32
|
};
|
|
31
33
|
|
|
32
34
|
function escapingWikiFormatter(text) {
|
|
33
|
-
|
|
35
|
+
var pattern = ['([\\![])'].concat(_toConsumableArray(macroKeywordTokenMap.map(function (macro) {
|
|
36
|
+
return "(".concat(macro.regex.source.replace('^', ''), ")");
|
|
37
|
+
}))).join('|');
|
|
38
|
+
return text.replace(new RegExp(pattern, 'g'), '\\$&');
|
|
34
39
|
}
|
|
35
40
|
|
|
36
41
|
export var text = function text(node) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import { TokenType } from './';
|
|
3
|
-
import { hasAnyOfMarks } from '../utils/text';
|
|
3
|
+
import { hasAnyOfMarks, getSurroundingSymbols } from '../utils/text';
|
|
4
4
|
import { commonFormatter } from './common-formatter';
|
|
5
5
|
import { parseString } from '../text';
|
|
6
6
|
import { EM_DASH } from '../../char';
|
|
@@ -45,9 +45,13 @@ export var citation = function citation(_ref) {
|
|
|
45
45
|
};
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
+
var _getSurroundingSymbol = getSurroundingSymbols(input.substring(position), '??', '??'),
|
|
49
|
+
openingSymbol = _getSurroundingSymbol.openingSymbol,
|
|
50
|
+
closingSymbol = _getSurroundingSymbol.closingSymbol;
|
|
51
|
+
|
|
48
52
|
return commonFormatter(input, position, schema, {
|
|
49
|
-
opening:
|
|
50
|
-
closing:
|
|
53
|
+
opening: openingSymbol,
|
|
54
|
+
closing: closingSymbol,
|
|
51
55
|
context: context,
|
|
52
56
|
rawContentProcessor: rawContentProcessor
|
|
53
57
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import { TokenType } from './';
|
|
3
|
-
import { hasAnyOfMarks } from '../utils/text';
|
|
3
|
+
import { hasAnyOfMarks, getSurroundingSymbols } from '../utils/text';
|
|
4
4
|
import { commonFormatter } from './common-formatter';
|
|
5
5
|
import { parseString } from '../text';
|
|
6
6
|
export var deleted = function deleted(_ref) {
|
|
@@ -41,9 +41,13 @@ export var deleted = function deleted(_ref) {
|
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
+
var _getSurroundingSymbol = getSurroundingSymbols(input.substring(position), '-', '-'),
|
|
45
|
+
openingSymbol = _getSurroundingSymbol.openingSymbol,
|
|
46
|
+
closingSymbol = _getSurroundingSymbol.closingSymbol;
|
|
47
|
+
|
|
44
48
|
return commonFormatter(input, position, schema, {
|
|
45
|
-
opening:
|
|
46
|
-
closing:
|
|
49
|
+
opening: openingSymbol,
|
|
50
|
+
closing: closingSymbol,
|
|
47
51
|
context: context,
|
|
48
52
|
rawContentProcessor: rawContentProcessor
|
|
49
53
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import { TokenType } from './';
|
|
3
|
-
import { hasAnyOfMarks } from '../utils/text';
|
|
3
|
+
import { hasAnyOfMarks, getSurroundingSymbols } from '../utils/text';
|
|
4
4
|
import { commonFormatter } from './common-formatter';
|
|
5
5
|
import { parseString } from '../text';
|
|
6
6
|
export var emphasis = function emphasis(_ref) {
|
|
@@ -40,9 +40,13 @@ export var emphasis = function emphasis(_ref) {
|
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
42
|
|
|
43
|
+
var _getSurroundingSymbol = getSurroundingSymbols(input.substring(position), '_', '_'),
|
|
44
|
+
openingSymbol = _getSurroundingSymbol.openingSymbol,
|
|
45
|
+
closingSymbol = _getSurroundingSymbol.closingSymbol;
|
|
46
|
+
|
|
43
47
|
return commonFormatter(input, position, schema, {
|
|
44
|
-
opening:
|
|
45
|
-
closing:
|
|
48
|
+
opening: openingSymbol,
|
|
49
|
+
closing: closingSymbol,
|
|
46
50
|
context: context,
|
|
47
51
|
rawContentProcessor: rawContentProcessor
|
|
48
52
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import { TokenType } from './';
|
|
3
|
-
import { hasAnyOfMarks } from '../utils/text';
|
|
3
|
+
import { hasAnyOfMarks, getSurroundingSymbols } from '../utils/text';
|
|
4
4
|
import { commonFormatter } from './common-formatter';
|
|
5
5
|
import { parseString } from '../text';
|
|
6
6
|
export var inserted = function inserted(_ref) {
|
|
@@ -40,9 +40,13 @@ export var inserted = function inserted(_ref) {
|
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
42
|
|
|
43
|
+
var _getSurroundingSymbol = getSurroundingSymbols(input.substring(position), '+', '+'),
|
|
44
|
+
openingSymbol = _getSurroundingSymbol.openingSymbol,
|
|
45
|
+
closingSymbol = _getSurroundingSymbol.closingSymbol;
|
|
46
|
+
|
|
43
47
|
return commonFormatter(input, position, schema, {
|
|
44
|
-
opening:
|
|
45
|
-
closing:
|
|
48
|
+
opening: openingSymbol,
|
|
49
|
+
closing: closingSymbol,
|
|
46
50
|
context: context,
|
|
47
51
|
rawContentProcessor: rawContentProcessor
|
|
48
52
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TokenType } from './';
|
|
2
2
|
import { MAX_LIST_DEPTH } from './list';
|
|
3
|
-
var macroKeywordTokenMap = [{
|
|
3
|
+
export var macroKeywordTokenMap = [{
|
|
4
4
|
type: TokenType.ADF_MACRO,
|
|
5
5
|
regex: /^{adf/i
|
|
6
6
|
}, {
|
|
@@ -44,6 +44,14 @@ var keywordTokenMap = {
|
|
|
44
44
|
'----': TokenType.QUADRUPLE_DASH_SYMBOL,
|
|
45
45
|
'---': TokenType.TRIPLE_DASH_SYMBOL,
|
|
46
46
|
'--': TokenType.DOUBLE_DASH_SYMBOL,
|
|
47
|
+
'{-}': TokenType.DELETED,
|
|
48
|
+
'{+}': TokenType.INSERTED,
|
|
49
|
+
'{*}': TokenType.STRONG,
|
|
50
|
+
'{^}': TokenType.SUPERSCRIPT,
|
|
51
|
+
'{~}': TokenType.SUBSCRIPT,
|
|
52
|
+
'{_}': TokenType.EMPHASIS,
|
|
53
|
+
'{{{}': TokenType.MONOSPACE,
|
|
54
|
+
'{??}': TokenType.CITATION,
|
|
47
55
|
'-': TokenType.DELETED,
|
|
48
56
|
'+': TokenType.INSERTED,
|
|
49
57
|
'*': TokenType.STRONG,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TokenType } from './';
|
|
2
|
+
import { getSurroundingSymbols } from '../utils/text';
|
|
2
3
|
import { commonFormatter } from './common-formatter';
|
|
3
4
|
import { parseString } from '../text';
|
|
4
5
|
export var monospace = function monospace(_ref) {
|
|
@@ -38,9 +39,13 @@ export var monospace = function monospace(_ref) {
|
|
|
38
39
|
};
|
|
39
40
|
};
|
|
40
41
|
|
|
42
|
+
var _getSurroundingSymbol = getSurroundingSymbols(input.substring(position), '{{', '}}'),
|
|
43
|
+
openingSymbol = _getSurroundingSymbol.openingSymbol,
|
|
44
|
+
closingSymbol = _getSurroundingSymbol.closingSymbol;
|
|
45
|
+
|
|
41
46
|
return commonFormatter(input, position, schema, {
|
|
42
|
-
opening:
|
|
43
|
-
closing:
|
|
47
|
+
opening: openingSymbol,
|
|
48
|
+
closing: closingSymbol,
|
|
44
49
|
context: context,
|
|
45
50
|
rawContentProcessor: rawContentProcessor
|
|
46
51
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import { TokenType } from './';
|
|
3
|
-
import { hasAnyOfMarks } from '../utils/text';
|
|
3
|
+
import { hasAnyOfMarks, getSurroundingSymbols } from '../utils/text';
|
|
4
4
|
import { commonFormatter } from './common-formatter';
|
|
5
5
|
import { parseString } from '../text';
|
|
6
6
|
export var strong = function strong(_ref) {
|
|
@@ -40,9 +40,13 @@ export var strong = function strong(_ref) {
|
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
42
|
|
|
43
|
+
var _getSurroundingSymbol = getSurroundingSymbols(input.substring(position), '*', '*'),
|
|
44
|
+
openingSymbol = _getSurroundingSymbol.openingSymbol,
|
|
45
|
+
closingSymbol = _getSurroundingSymbol.closingSymbol;
|
|
46
|
+
|
|
43
47
|
return commonFormatter(input, position, schema, {
|
|
44
|
-
opening:
|
|
45
|
-
closing:
|
|
48
|
+
opening: openingSymbol,
|
|
49
|
+
closing: closingSymbol,
|
|
46
50
|
context: context,
|
|
47
51
|
rawContentProcessor: rawContentProcessor
|
|
48
52
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import { TokenType } from './';
|
|
3
|
-
import { hasAnyOfMarks } from '../utils/text';
|
|
3
|
+
import { hasAnyOfMarks, getSurroundingSymbols } from '../utils/text';
|
|
4
4
|
import { commonFormatter } from './common-formatter';
|
|
5
5
|
import { parseString } from '../text';
|
|
6
6
|
export var subscript = function subscript(_ref) {
|
|
@@ -42,9 +42,13 @@ export var subscript = function subscript(_ref) {
|
|
|
42
42
|
};
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
+
var _getSurroundingSymbol = getSurroundingSymbols(input.substring(position), '~', '~'),
|
|
46
|
+
openingSymbol = _getSurroundingSymbol.openingSymbol,
|
|
47
|
+
closingSymbol = _getSurroundingSymbol.closingSymbol;
|
|
48
|
+
|
|
45
49
|
return commonFormatter(input, position, schema, {
|
|
46
|
-
opening:
|
|
47
|
-
closing:
|
|
50
|
+
opening: openingSymbol,
|
|
51
|
+
closing: closingSymbol,
|
|
48
52
|
context: context,
|
|
49
53
|
rawContentProcessor: rawContentProcessor
|
|
50
54
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import { TokenType } from './';
|
|
3
|
-
import { hasAnyOfMarks } from '../utils/text';
|
|
3
|
+
import { hasAnyOfMarks, getSurroundingSymbols } from '../utils/text';
|
|
4
4
|
import { commonFormatter } from './common-formatter';
|
|
5
5
|
import { parseString } from '../text';
|
|
6
6
|
export var superscript = function superscript(_ref) {
|
|
@@ -42,9 +42,13 @@ export var superscript = function superscript(_ref) {
|
|
|
42
42
|
};
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
+
var _getSurroundingSymbol = getSurroundingSymbols(input.substring(position), '^', '^'),
|
|
46
|
+
openingSymbol = _getSurroundingSymbol.openingSymbol,
|
|
47
|
+
closingSymbol = _getSurroundingSymbol.closingSymbol;
|
|
48
|
+
|
|
45
49
|
return commonFormatter(input, position, schema, {
|
|
46
|
-
opening:
|
|
47
|
-
closing:
|
|
50
|
+
opening: openingSymbol,
|
|
51
|
+
closing: closingSymbol,
|
|
48
52
|
context: context,
|
|
49
53
|
rawContentProcessor: rawContentProcessor
|
|
50
54
|
});
|
|
@@ -19,7 +19,20 @@ export function isBlank(value) {
|
|
|
19
19
|
}
|
|
20
20
|
export function isNotBlank(value) {
|
|
21
21
|
return !isBlank(value);
|
|
22
|
-
}
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* ESS-2375 Returns the beginning and closing symbol to parse a token
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
export var getSurroundingSymbols = function getSurroundingSymbols(trimmedInput, openingText, closingText) {
|
|
28
|
+
var openingSymbol = trimmedInput.startsWith("{".concat(openingText, "}")) ? "{".concat(openingText, "}") : openingText;
|
|
29
|
+
var endIndex = trimmedInput.indexOf(closingText, openingSymbol === "{".concat(openingText, "}") ? openingText.length + 2 : openingText.length);
|
|
30
|
+
var closingSymbol = endIndex > -1 && trimmedInput.charAt(endIndex - 1) === '{' && trimmedInput.charAt(endIndex + closingText.length) === '}' ? "{".concat(closingText, "}") : closingText;
|
|
31
|
+
return {
|
|
32
|
+
openingSymbol: openingSymbol,
|
|
33
|
+
closingSymbol: closingSymbol
|
|
34
|
+
};
|
|
35
|
+
}; // TODO This is using strings which makes it potentially a performance bottleneck
|
|
23
36
|
|
|
24
37
|
export var StringBuffer = /*#__PURE__*/function () {
|
|
25
38
|
function StringBuffer() {
|
package/dist/esm/version.json
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { TokenType } from './';
|
|
2
|
+
interface KeywordToken {
|
|
3
|
+
type: TokenType;
|
|
4
|
+
regex: RegExp;
|
|
5
|
+
}
|
|
6
|
+
export declare const macroKeywordTokenMap: KeywordToken[];
|
|
2
7
|
export declare function parseMacroKeyword(input: string): {
|
|
3
8
|
type: TokenType;
|
|
4
9
|
} | null;
|
|
@@ -11,3 +16,4 @@ export declare function parseLeadingKeyword(input: string): {
|
|
|
11
16
|
export declare function parseIssueKeyword(input: string, issueKeyRegex?: RegExp): {
|
|
12
17
|
type: TokenType;
|
|
13
18
|
} | null;
|
|
19
|
+
export {};
|
|
@@ -6,6 +6,10 @@ export declare function hasAnyOfMarks(node: PMNode, types: string[]): boolean;
|
|
|
6
6
|
export declare function isDigit(value: string): boolean;
|
|
7
7
|
export declare function isBlank(value: string | null): boolean;
|
|
8
8
|
export declare function isNotBlank(value: string | null): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* ESS-2375 Returns the beginning and closing symbol to parse a token
|
|
11
|
+
*/
|
|
12
|
+
export declare const getSurroundingSymbols: (trimmedInput: string, openingText: string, closingText: string) => Record<string, string>;
|
|
9
13
|
export declare class StringBuffer {
|
|
10
14
|
private buffer;
|
|
11
15
|
constructor(buffer?: string);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-wikimarkup-transformer",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.11",
|
|
4
4
|
"description": "Wiki markup transformer for JIRA and Confluence",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@atlaskit/adf-schema": "^23.
|
|
27
|
+
"@atlaskit/adf-schema": "^23.1.0",
|
|
28
28
|
"@atlaskit/editor-json-transformer": "^8.7.0",
|
|
29
29
|
"@atlaskit/theme": "^12.1.0",
|
|
30
30
|
"@babel/runtime": "^7.0.0",
|
|
@@ -33,20 +33,20 @@
|
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@atlaskit/activity": "^1.0.1",
|
|
35
35
|
"@atlaskit/docs": "*",
|
|
36
|
-
"@atlaskit/editor-common": "^
|
|
37
|
-
"@atlaskit/editor-core": "^
|
|
36
|
+
"@atlaskit/editor-common": "^68.0.0",
|
|
37
|
+
"@atlaskit/editor-core": "^167.0.0",
|
|
38
38
|
"@atlaskit/editor-test-helpers": "^17.0.0",
|
|
39
39
|
"@atlaskit/mention": "^21.0.0",
|
|
40
|
-
"@atlaskit/profilecard": "^16.
|
|
41
|
-
"@atlaskit/renderer": "^
|
|
42
|
-
"@atlaskit/util-data-test": "^17.
|
|
40
|
+
"@atlaskit/profilecard": "^16.9.0",
|
|
41
|
+
"@atlaskit/renderer": "^96.0.0",
|
|
42
|
+
"@atlaskit/util-data-test": "^17.3.0",
|
|
43
43
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
44
|
+
"@emotion/react": "^11.7.1",
|
|
44
45
|
"@types/prosemirror-model": "^1.11.0",
|
|
45
46
|
"cookie": "^0.3.1",
|
|
46
47
|
"debug": "^2.2.0",
|
|
47
48
|
"react": "^16.8.0",
|
|
48
49
|
"rxjs": "^5.5.0",
|
|
49
|
-
"styled-components": "^3.2.6",
|
|
50
50
|
"typescript": "4.2.4"
|
|
51
51
|
},
|
|
52
52
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
package/report.api.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
## API Report File for "@atlaskit/editor-wikimarkup-transformer"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import { Node as Node_2 } from 'prosemirror-model';
|
|
7
|
+
import { Schema } from 'prosemirror-model';
|
|
8
|
+
|
|
9
|
+
// @public (undocumented)
|
|
10
|
+
class WikiMarkupTransformer implements Transformer_2<string> {
|
|
11
|
+
constructor(schema?: Schema);
|
|
12
|
+
// (undocumented)
|
|
13
|
+
encode(node: Node_2, context?: Context): string;
|
|
14
|
+
// (undocumented)
|
|
15
|
+
parse(wikiMarkup: string, context?: Context): Node_2;
|
|
16
|
+
}
|
|
17
|
+
export { WikiMarkupTransformer };
|
|
18
|
+
export default WikiMarkupTransformer;
|
|
19
|
+
|
|
20
|
+
// (No @packageDocumentation comment for this package)
|
|
21
|
+
```
|