@theia/core 1.72.0-next.11 → 1.72.0-next.16
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/README.md +3 -3
- package/lib/browser/catalog.json +13 -1
- package/lib/common/markdown-rendering/markdown-string.d.ts +1 -0
- package/lib/common/markdown-rendering/markdown-string.d.ts.map +1 -1
- package/lib/common/markdown-rendering/markdown-string.js +24 -2
- package/lib/common/markdown-rendering/markdown-string.js.map +1 -1
- package/lib/common/markdown-rendering/markdown-string.spec.d.ts +2 -0
- package/lib/common/markdown-rendering/markdown-string.spec.d.ts.map +1 -0
- package/lib/common/markdown-rendering/markdown-string.spec.js +47 -0
- package/lib/common/markdown-rendering/markdown-string.spec.js.map +1 -0
- package/package.json +15 -15
- package/src/browser/style/select-component.css +6 -1
- package/src/common/markdown-rendering/markdown-string.spec.ts +50 -0
- package/src/common/markdown-rendering/markdown-string.ts +24 -2
package/README.md
CHANGED
|
@@ -91,7 +91,7 @@ export class SomeClass {
|
|
|
91
91
|
- `@theia/request` (from [`@theia/request@1.71.0`](https://www.npmjs.com/package/@theia/request/v/1.71.0))
|
|
92
92
|
- `@theia/request/lib/proxy` (from [`@theia/request@1.71.0`](https://www.npmjs.com/package/@theia/request/v/1.71.0))
|
|
93
93
|
- `@theia/request/lib/node-request-service` (from [`@theia/request@1.71.0`](https://www.npmjs.com/package/@theia/request/v/1.71.0))
|
|
94
|
-
- `fs-extra` (from [`fs-extra@^4.0.
|
|
94
|
+
- `fs-extra` (from [`fs-extra@^4.0.3`](https://www.npmjs.com/package/fs-extra))
|
|
95
95
|
- `fuzzy` (from [`fuzzy@^0.1.3`](https://www.npmjs.com/package/fuzzy))
|
|
96
96
|
- `inversify` (from [`inversify@^6.2.2`](https://www.npmjs.com/package/inversify))
|
|
97
97
|
- `react-dom` (from [`react-dom@^18.3.1`](https://www.npmjs.com/package/react-dom))
|
|
@@ -100,7 +100,7 @@ export class SomeClass {
|
|
|
100
100
|
- `vscode-languageserver-protocol` (from [`vscode-languageserver-protocol@3.17.5`](https://www.npmjs.com/package/vscode-languageserver-protocol/v/3.17.5))
|
|
101
101
|
- `vscode-uri` (from [`vscode-uri@3.0.8`](https://www.npmjs.com/package/vscode-uri/v/3.0.8))
|
|
102
102
|
- `@parcel/watcher` (from [`@parcel/watcher@^2.5.6`](https://www.npmjs.com/package/@parcel/watcher))
|
|
103
|
-
- `dompurify` (from [`dompurify@^3.
|
|
103
|
+
- `dompurify` (from [`dompurify@^3.4.2`](https://www.npmjs.com/package/dompurify))
|
|
104
104
|
- `express` (from [`express@^4.22.1`](https://www.npmjs.com/package/express))
|
|
105
105
|
- `lodash.debounce` (from [`lodash.debounce@^4.0.8`](https://www.npmjs.com/package/lodash.debounce))
|
|
106
106
|
- `lodash.throttle` (from [`lodash.throttle@^4.1.1`](https://www.npmjs.com/package/lodash.throttle))
|
|
@@ -109,7 +109,7 @@ export class SomeClass {
|
|
|
109
109
|
- `markdown-it-emoji` (from [`markdown-it-emoji@^3.0.0`](https://www.npmjs.com/package/markdown-it-emoji))
|
|
110
110
|
- `react` (from [`react@^18.3.1`](https://www.npmjs.com/package/react))
|
|
111
111
|
- `ws` (from [`ws@^8.20.0`](https://www.npmjs.com/package/ws))
|
|
112
|
-
- `yargs` (from [`yargs@^15.
|
|
112
|
+
- `yargs` (from [`yargs@^15.4.1`](https://www.npmjs.com/package/yargs))
|
|
113
113
|
|
|
114
114
|
## Logging Configuration
|
|
115
115
|
|
package/lib/browser/catalog.json
CHANGED
|
@@ -2674,6 +2674,12 @@
|
|
|
2674
2674
|
"description": "Policy file for use with Enterprise Contract",
|
|
2675
2675
|
"url": "https://enterprisecontract.dev/enterprise-contract-controller/schema/policy_spec.json"
|
|
2676
2676
|
},
|
|
2677
|
+
{
|
|
2678
|
+
"name": "Envilder Map File",
|
|
2679
|
+
"description": "Envilder secret mapping file that maps environment variable names to cloud secret paths",
|
|
2680
|
+
"fileMatch": ["envilder.json", "envilder.*.json"],
|
|
2681
|
+
"url": "https://envilder.com/schema/map-file.v1.json"
|
|
2682
|
+
},
|
|
2677
2683
|
{
|
|
2678
2684
|
"name": ".esmrc.json",
|
|
2679
2685
|
"description": "Configuration files for the esm module/package in Node.js",
|
|
@@ -8445,7 +8451,7 @@
|
|
|
8445
8451
|
"name": "Declarative Automation Bundles",
|
|
8446
8452
|
"description": "Declarative Automation Bundles config",
|
|
8447
8453
|
"fileMatch": ["databricks.yml", "databricks.yaml"],
|
|
8448
|
-
"url": "https://
|
|
8454
|
+
"url": "https://github.com/databricks/cli/releases/latest/download/jsonschema.json"
|
|
8449
8455
|
},
|
|
8450
8456
|
{
|
|
8451
8457
|
"name": "JSON Schema Draft 4 (unofficial with '$ref' and 'format')",
|
|
@@ -9773,6 +9779,12 @@
|
|
|
9773
9779
|
"description": "Open standard for AI agent team definitions — declare agents, roles, tools, access policies, and pipelines in a single versioned document",
|
|
9774
9780
|
"fileMatch": ["*.envelope.json", "team.envelope.json"],
|
|
9775
9781
|
"url": "https://schema.openenvelope.org/team/v1.json"
|
|
9782
|
+
},
|
|
9783
|
+
{
|
|
9784
|
+
"name": "Acton",
|
|
9785
|
+
"description": "Configuration file for Acton projects",
|
|
9786
|
+
"fileMatch": ["Acton.toml"],
|
|
9787
|
+
"url": "https://raw.githubusercontent.com/ton-blockchain/acton/master/crates/acton-config/schemas/acton.schema.json"
|
|
9776
9788
|
}
|
|
9777
9789
|
]
|
|
9778
9790
|
}
|
|
@@ -36,6 +36,7 @@ export declare class MarkdownStringImpl implements MarkdownString {
|
|
|
36
36
|
appendText(value: string, newlineStyle?: MarkdownStringTextNewlineStyle): MarkdownStringImpl;
|
|
37
37
|
appendMarkdown(value: string): MarkdownStringImpl;
|
|
38
38
|
appendCodeblock(langId: string, code: string): MarkdownStringImpl;
|
|
39
|
+
private static longestBacktickRun;
|
|
39
40
|
appendLink(target: UriComponents | string, label: string, title?: string): MarkdownStringImpl;
|
|
40
41
|
private _escape;
|
|
41
42
|
}
|
|
@@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E,MAAW,EAClB,kBAAkB,GAAE,OAAO,GAAG;QAAE,SAAS,CAAC,EAAE,OAAO,GAAG,4BAA4B,CAAC;QAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAAC,WAAW,CAAC,EAAE,OAAO,CAAA;KAAU;IAkBpJ,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,GAAE,8BAAyE,GAAG,kBAAkB;IAStI,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,kBAAkB;IAKjD,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,kBAAkB;IAejE,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAgBjC,UAAU,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,kBAAkB;IAY7F,OAAO,CAAC,OAAO;CAUlB;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAG/D;AAID,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,CAoB3F"}
|
|
@@ -66,13 +66,35 @@ class MarkdownStringImpl {
|
|
|
66
66
|
return this;
|
|
67
67
|
}
|
|
68
68
|
appendCodeblock(langId, code) {
|
|
69
|
-
|
|
69
|
+
// Use a fence longer than any run of backticks in the code so that triple-backtick
|
|
70
|
+
// sequences inside `code` cannot prematurely close the surrounding fenced block.
|
|
71
|
+
const fence = '`'.repeat(Math.max(3, MarkdownStringImpl.longestBacktickRun(code) + 1));
|
|
72
|
+
this.value += '\n';
|
|
73
|
+
this.value += fence;
|
|
70
74
|
this.value += langId;
|
|
71
75
|
this.value += '\n';
|
|
72
76
|
this.value += code;
|
|
73
|
-
this.value += '\n
|
|
77
|
+
this.value += '\n';
|
|
78
|
+
this.value += fence;
|
|
79
|
+
this.value += '\n';
|
|
74
80
|
return this;
|
|
75
81
|
}
|
|
82
|
+
static longestBacktickRun(value) {
|
|
83
|
+
let longest = 0;
|
|
84
|
+
let current = 0;
|
|
85
|
+
for (let i = 0; i < value.length; i++) {
|
|
86
|
+
if (value.charCodeAt(i) === 96 /* ` */) {
|
|
87
|
+
current++;
|
|
88
|
+
if (current > longest) {
|
|
89
|
+
longest = current;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
current = 0;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return longest;
|
|
97
|
+
}
|
|
76
98
|
appendLink(target, label, title) {
|
|
77
99
|
this.value += '[';
|
|
78
100
|
this.value += this._escape(label, ']');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-string.js","sourceRoot":"","sources":["../../../src/common/markdown-rendering/markdown-string.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,0CAA0C;AAC1C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;
|
|
1
|
+
{"version":3,"file":"markdown-string.js","sourceRoot":"","sources":["../../../src/common/markdown-rendering/markdown-string.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,0CAA0C;AAC1C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAoIhF,gEAGC;AAID,wDAoBC;AA7JD,wCAAoD;AAEpD,qDAA+C;AAC/C,oCAA8C;AAe9C,IAAY,8BAGX;AAHD,WAAY,8BAA8B;IACtC,6FAAa,CAAA;IACb,qFA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,IAAI,cAAc,EAAE,CAAC;YACjB,UAAU,CAAC,IAAI,CAAC,WAAW,MAAM,GAAG,CAAC,CAAC;QAC1C,CAAC;IACL,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;AAChC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown-string.spec.d.ts","sourceRoot":"","sources":["../../../src/common/markdown-rendering/markdown-string.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2026 EclipseSource and others.
|
|
4
|
+
//
|
|
5
|
+
// This program and the accompanying materials are made available under the
|
|
6
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
//
|
|
9
|
+
// This Source Code may also be made available under the following Secondary
|
|
10
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
// with the GNU Classpath Exception which is available at
|
|
13
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const chai_1 = require("chai");
|
|
19
|
+
const markdown_string_1 = require("./markdown-string");
|
|
20
|
+
describe('MarkdownStringImpl#appendCodeblock', () => {
|
|
21
|
+
it('uses a triple-backtick fence for code without backticks', () => {
|
|
22
|
+
const md = new markdown_string_1.MarkdownStringImpl();
|
|
23
|
+
md.appendCodeblock('json', '{ "type": "adaptive" }');
|
|
24
|
+
(0, chai_1.expect)(md.value).to.equal('\n```json\n{ "type": "adaptive" }\n```\n');
|
|
25
|
+
});
|
|
26
|
+
it('uses a longer fence when the code contains a triple-backtick run', () => {
|
|
27
|
+
const md = new markdown_string_1.MarkdownStringImpl();
|
|
28
|
+
const code = 'before\n```json\n{ "x": 1 }\n```\nafter';
|
|
29
|
+
md.appendCodeblock('', code);
|
|
30
|
+
// The fence must be at least 4 backticks so the inner ``` cannot close it.
|
|
31
|
+
(0, chai_1.expect)(md.value).to.equal('\n````\n' + code + '\n````\n');
|
|
32
|
+
});
|
|
33
|
+
it('grows the fence to be longer than the longest backtick run inside the code', () => {
|
|
34
|
+
const md = new markdown_string_1.MarkdownStringImpl();
|
|
35
|
+
const code = 'a ```` b ``` c';
|
|
36
|
+
md.appendCodeblock('', code);
|
|
37
|
+
// Longest run is 4, so fence must be 5.
|
|
38
|
+
(0, chai_1.expect)(md.value).to.equal('\n`````\n' + code + '\n`````\n');
|
|
39
|
+
});
|
|
40
|
+
it('still uses a triple-backtick fence when only single/double backticks appear', () => {
|
|
41
|
+
const md = new markdown_string_1.MarkdownStringImpl();
|
|
42
|
+
const code = 'inline `code` and ``double`` only';
|
|
43
|
+
md.appendCodeblock('', code);
|
|
44
|
+
(0, chai_1.expect)(md.value).to.equal('\n```\n' + code + '\n```\n');
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
//# sourceMappingURL=markdown-string.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown-string.spec.js","sourceRoot":"","sources":["../../../src/common/markdown-rendering/markdown-string.spec.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;AAEhF,+BAA8B;AAC9B,uDAAuD;AAEvD,QAAQ,CAAC,oCAAoC,EAAE,GAAG,EAAE;IAEhD,EAAE,CAAC,yDA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,KAAK,CAAC,SAAS,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/core",
|
|
3
|
-
"version": "1.72.0-next.
|
|
3
|
+
"version": "1.72.0-next.16+ce3a20e44",
|
|
4
4
|
"description": "Theia is a cloud & desktop IDE framework implemented in TypeScript.",
|
|
5
5
|
"main": "lib/common/index.js",
|
|
6
6
|
"typings": "lib/common/index.d.ts",
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
"@lumino/virtualdom": "^2.0.4",
|
|
18
18
|
"@lumino/widgets": "2.7.5",
|
|
19
19
|
"@parcel/watcher": "^2.5.6",
|
|
20
|
-
"@theia/application-package": "1.72.0-next.
|
|
21
|
-
"@theia/request": "1.72.0-next.
|
|
20
|
+
"@theia/application-package": "1.72.0-next.16+ce3a20e44",
|
|
21
|
+
"@theia/request": "1.72.0-next.16+ce3a20e44",
|
|
22
22
|
"@types/body-parser": "^1.19.6",
|
|
23
|
-
"@types/express": "^4.17.
|
|
24
|
-
"@types/fs-extra": "^4.0.
|
|
23
|
+
"@types/express": "^4.17.25",
|
|
24
|
+
"@types/fs-extra": "^4.0.15",
|
|
25
25
|
"@types/lodash.debounce": "4.0.3",
|
|
26
26
|
"@types/lodash.throttle": "^4.1.9",
|
|
27
27
|
"@types/markdown-it": "^14.1.2",
|
|
@@ -34,20 +34,20 @@
|
|
|
34
34
|
"@types/ws": "^8.18.1",
|
|
35
35
|
"@types/yargs": "^15",
|
|
36
36
|
"@vscode/codicons": "0.0.45",
|
|
37
|
-
"ajv": "^6.
|
|
37
|
+
"ajv": "^6.15.0",
|
|
38
38
|
"async-mutex": "^0.4.1",
|
|
39
|
-
"body-parser": "^1.20.
|
|
39
|
+
"body-parser": "^1.20.5",
|
|
40
40
|
"cookie": "^1.1.1",
|
|
41
|
-
"dompurify": "^3.
|
|
41
|
+
"dompurify": "^3.4.2",
|
|
42
42
|
"drivelist": "^12.0.2",
|
|
43
43
|
"express": "^4.22.1",
|
|
44
44
|
"fast-json-stable-stringify": "^2.1.0",
|
|
45
45
|
"file-icons-js": "~1.0.3",
|
|
46
46
|
"font-awesome": "^4.7.0",
|
|
47
|
-
"fs-extra": "^4.0.
|
|
47
|
+
"fs-extra": "^4.0.3",
|
|
48
48
|
"fuzzy": "^0.1.3",
|
|
49
49
|
"http-proxy-agent": "^5.0.0",
|
|
50
|
-
"https-proxy-agent": "^5.0.
|
|
50
|
+
"https-proxy-agent": "^5.0.1",
|
|
51
51
|
"iconv-lite": "^0.6.3",
|
|
52
52
|
"inversify": "^6.2.2",
|
|
53
53
|
"jschardet": "^2.3.0",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"markdown-it": "^14.1.1",
|
|
58
58
|
"markdown-it-anchor": "^9.2.0",
|
|
59
59
|
"markdown-it-emoji": "^3.0.0",
|
|
60
|
-
"msgpackr": "^1.11.
|
|
60
|
+
"msgpackr": "^1.11.12",
|
|
61
61
|
"p-debounce": "^2.1.0",
|
|
62
62
|
"perfect-scrollbar": "1.5.5",
|
|
63
63
|
"react": "^18.3.1",
|
|
@@ -69,12 +69,12 @@
|
|
|
69
69
|
"safer-buffer": "^2.1.2",
|
|
70
70
|
"socket.io": "^4.8.3",
|
|
71
71
|
"socket.io-client": "^4.8.3",
|
|
72
|
-
"tslib": "^2.
|
|
72
|
+
"tslib": "^2.8.1",
|
|
73
73
|
"uuid": "^9.0.1",
|
|
74
74
|
"vscode-languageserver-protocol": "3.17.5",
|
|
75
75
|
"vscode-uri": "3.0.8",
|
|
76
76
|
"ws": "^8.20.0",
|
|
77
|
-
"yargs": "^15.
|
|
77
|
+
"yargs": "^15.4.1"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
80
80
|
"@theia/electron": "*"
|
|
@@ -215,11 +215,11 @@
|
|
|
215
215
|
"devDependencies": {
|
|
216
216
|
"@theia/ext-scripts": "1.71.0",
|
|
217
217
|
"@theia/re-exports": "1.71.0",
|
|
218
|
-
"minimist": "^1.2.
|
|
218
|
+
"minimist": "^1.2.8",
|
|
219
219
|
"nodejs-file-downloader": "4.13.0"
|
|
220
220
|
},
|
|
221
221
|
"nyc": {
|
|
222
222
|
"extends": "../../configs/nyc.json"
|
|
223
223
|
},
|
|
224
|
-
"gitHead": "
|
|
224
|
+
"gitHead": "ce3a20e445110abbe72361374bd4b786ba606049"
|
|
225
225
|
}
|
|
@@ -15,7 +15,12 @@
|
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
17
|
.theia-select-component-container {
|
|
18
|
-
/*
|
|
18
|
+
/* position is required for z-index to take effect; top/left at 0 anchors
|
|
19
|
+
the container so the absolutely-positioned dropdown resolves its
|
|
20
|
+
viewport-relative coordinates correctly. */
|
|
21
|
+
position: absolute;
|
|
22
|
+
top: 0;
|
|
23
|
+
left: 0;
|
|
19
24
|
z-index: 6000;
|
|
20
25
|
}
|
|
21
26
|
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2026 EclipseSource and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
import { expect } from 'chai';
|
|
18
|
+
import { MarkdownStringImpl } from './markdown-string';
|
|
19
|
+
|
|
20
|
+
describe('MarkdownStringImpl#appendCodeblock', () => {
|
|
21
|
+
|
|
22
|
+
it('uses a triple-backtick fence for code without backticks', () => {
|
|
23
|
+
const md = new MarkdownStringImpl();
|
|
24
|
+
md.appendCodeblock('json', '{ "type": "adaptive" }');
|
|
25
|
+
expect(md.value).to.equal('\n```json\n{ "type": "adaptive" }\n```\n');
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it('uses a longer fence when the code contains a triple-backtick run', () => {
|
|
29
|
+
const md = new MarkdownStringImpl();
|
|
30
|
+
const code = 'before\n```json\n{ "x": 1 }\n```\nafter';
|
|
31
|
+
md.appendCodeblock('', code);
|
|
32
|
+
// The fence must be at least 4 backticks so the inner ``` cannot close it.
|
|
33
|
+
expect(md.value).to.equal('\n````\n' + code + '\n````\n');
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it('grows the fence to be longer than the longest backtick run inside the code', () => {
|
|
37
|
+
const md = new MarkdownStringImpl();
|
|
38
|
+
const code = 'a ```` b ``` c';
|
|
39
|
+
md.appendCodeblock('', code);
|
|
40
|
+
// Longest run is 4, so fence must be 5.
|
|
41
|
+
expect(md.value).to.equal('\n`````\n' + code + '\n`````\n');
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it('still uses a triple-backtick fence when only single/double backticks appear', () => {
|
|
45
|
+
const md = new MarkdownStringImpl();
|
|
46
|
+
const code = 'inline `code` and ``double`` only';
|
|
47
|
+
md.appendCodeblock('', code);
|
|
48
|
+
expect(md.value).to.equal('\n```\n' + code + '\n```\n');
|
|
49
|
+
});
|
|
50
|
+
});
|
|
@@ -90,14 +90,36 @@ export class MarkdownStringImpl implements MarkdownString {
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
appendCodeblock(langId: string, code: string): MarkdownStringImpl {
|
|
93
|
-
|
|
93
|
+
// Use a fence longer than any run of backticks in the code so that triple-backtick
|
|
94
|
+
// sequences inside `code` cannot prematurely close the surrounding fenced block.
|
|
95
|
+
const fence = '`'.repeat(Math.max(3, MarkdownStringImpl.longestBacktickRun(code) + 1));
|
|
96
|
+
this.value += '\n';
|
|
97
|
+
this.value += fence;
|
|
94
98
|
this.value += langId;
|
|
95
99
|
this.value += '\n';
|
|
96
100
|
this.value += code;
|
|
97
|
-
this.value += '\n
|
|
101
|
+
this.value += '\n';
|
|
102
|
+
this.value += fence;
|
|
103
|
+
this.value += '\n';
|
|
98
104
|
return this;
|
|
99
105
|
}
|
|
100
106
|
|
|
107
|
+
private static longestBacktickRun(value: string): number {
|
|
108
|
+
let longest = 0;
|
|
109
|
+
let current = 0;
|
|
110
|
+
for (let i = 0; i < value.length; i++) {
|
|
111
|
+
if (value.charCodeAt(i) === 96 /* ` */) {
|
|
112
|
+
current++;
|
|
113
|
+
if (current > longest) {
|
|
114
|
+
longest = current;
|
|
115
|
+
}
|
|
116
|
+
} else {
|
|
117
|
+
current = 0;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return longest;
|
|
121
|
+
}
|
|
122
|
+
|
|
101
123
|
appendLink(target: UriComponents | string, label: string, title?: string): MarkdownStringImpl {
|
|
102
124
|
this.value += '[';
|
|
103
125
|
this.value += this._escape(label, ']');
|