Skip to content

Commit 8c1a962

Browse files
committed
Merge branch 'main' into joh/swc
2 parents d824159 + faa736e commit 8c1a962

File tree

132 files changed

+3415
-1629
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+3415
-1629
lines changed

.eslintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@
248248
"url",
249249
"util",
250250
"v8-inspect-profiler",
251+
"vscode-policy-watcher",
251252
"vscode-proxy-agent",
252253
"vscode-regexpp",
253254
"vscode-textmate",

build/.moduleignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,14 @@ vscode-encrypt/binding.gyp
107107
vscode-encrypt/README.md
108108
!vscode-encrypt/build/Release/vscode-encrypt-native.node
109109

110+
vscode-policy-watcher/build/**
111+
vscode-policy-watcher/.husky/**
112+
vscode-policy-watcher/src/**
113+
vscode-policy-watcher/binding.gyp
114+
vscode-policy-watcher/README.md
115+
vscode-policy-watcher/index.d.ts
116+
!vscode-policy-watcher/build/Release/vscode-policy-watcher.node
117+
110118
vscode-windows-ca-certs/**/*
111119
!vscode-windows-ca-certs/package.json
112120
!vscode-windows-ca-certs/**/*.node

extensions/ipynb/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"vscode": "^1.57.0"
1010
},
1111
"enabledApiProposals": [
12-
"notebookEditor",
1312
"notebookWorkspaceEdit"
1413
],
1514
"activationEvents": [

extensions/ipynb/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"include": [
1010
"src/**/*",
1111
"../../src/vscode-dts/vscode.d.ts",
12-
"../../src/vscode-dts/vscode.proposed.notebookEditor.d.ts",
1312
"../../src/vscode-dts/vscode.proposed.notebookWorkspaceEdit.d.ts"
1413
]
1514
}

extensions/markdown-language-features/notebook/index.ts

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,57 @@ import type * as MarkdownItToken from 'markdown-it/lib/token';
99
import type { ActivationFunction } from 'vscode-notebook-renderer';
1010

1111
const sanitizerOptions: DOMPurify.Config = {
12-
ALLOWED_TAGS: ['a', 'button', 'blockquote', 'code', 'div', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'img', 'input', 'label', 'li', 'p', 'pre', 'select', 'small', 'span', 'strong', 'textarea', 'ul', 'ol'],
12+
ALLOWED_TAGS: [
13+
'a',
14+
'b',
15+
'blockquote',
16+
'br',
17+
'button',
18+
'caption',
19+
'center',
20+
'code',
21+
'col',
22+
'colgroup',
23+
'details',
24+
'div',
25+
'em',
26+
'font',
27+
'h1',
28+
'h2',
29+
'h3',
30+
'h4',
31+
'h5',
32+
'h6',
33+
'hr',
34+
'i',
35+
'img',
36+
'input',
37+
'kbd',
38+
'label',
39+
'li',
40+
'ol',
41+
'p',
42+
'pre',
43+
'select',
44+
'small',
45+
'span',
46+
'strong',
47+
'sub',
48+
'summary',
49+
'sup',
50+
'table',
51+
'tbody',
52+
'td',
53+
'textarea',
54+
'tfoot',
55+
'th',
56+
'thead',
57+
'tr',
58+
'tt',
59+
'u',
60+
'ul',
61+
'video',
62+
],
1363
};
1464

1565
export const activate: ActivationFunction<void> = (ctx) => {

extensions/markdown-language-features/src/languageFeatures/diagnostics.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ export class DiagnosticComputer {
494494
if (fragmentLinks.length) {
495495
const toc = await TableOfContents.create(this.engine, hrefDoc);
496496
for (const link of fragmentLinks) {
497-
if (!toc.lookup(link.fragment) && !this.isIgnoredLink(options, link.source.text)) {
497+
if (!toc.lookup(link.fragment) && !this.isIgnoredLink(options, link.source.pathText) && !this.isIgnoredLink(options, link.source.text)) {
498498
const msg = localize('invalidLinkToHeaderInOtherFile', 'Header does not exist in file: {0}', link.fragment);
499499
diagnostics.push(new LinkDoesNotExistDiagnostic(link.source.hrefRange, msg, severity, link.source.text));
500500
}

extensions/markdown-language-features/src/test/diagnostic.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,4 +256,16 @@ suite('markdown: Diagnostics', () => {
256256
assert.deepStrictEqual(diagnostics.length, 0);
257257
}
258258
});
259+
260+
test('ignoreLinks should support ignore header links if file is ignored', async () => {
261+
const doc1 = new InMemoryDocument(workspacePath('doc1.md'), joinLines(
262+
`![i](/doc2.md#no-such)`,
263+
));
264+
const doc2 = new InMemoryDocument(workspacePath('doc2.md'), joinLines(''));
265+
266+
const contents = new InMemoryWorkspaceMarkdownDocuments([doc1, doc2]);
267+
const manager = createDiagnosticsManager(contents, new MemoryDiagnosticConfiguration(true, ['/doc2.md']));
268+
const { diagnostics } = await manager.recomputeDiagnosticState(doc1, noopToken);
269+
assert.deepStrictEqual(diagnostics.length, 0);
270+
});
259271
});

extensions/notebook-renderers/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"include": [
1010
"src/**/*",
1111
"../../src/vscode-dts/vscode.d.ts",
12-
"../../src/vscode-dts/vscode.proposed.notebookEditor.d.ts",
1312
"../../src/vscode-dts/vscode.proposed.notebookEditorEdit.d.ts",
1413
]
1514
}

extensions/vscode-api-tests/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"notebookControllerKind",
2525
"notebookDebugOptions",
2626
"notebookDeprecated",
27-
"notebookEditor",
2827
"notebookEditorDecorationType",
2928
"notebookEditorEdit",
3029
"notebookLiveShare",

extensions/vscode-notebook-tests/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"notebookControllerKind",
1616
"notebookDebugOptions",
1717
"notebookDeprecated",
18-
"notebookEditor",
1918
"notebookEditorDecorationType",
2019
"notebookLiveShare",
2120
"notebookMessaging",

0 commit comments

Comments
 (0)