Merge from vscode 2c306f762bf9c3db82dc06c7afaa56ef46d72f79 (#14050)

* Merge from vscode 2c306f762bf9c3db82dc06c7afaa56ef46d72f79

* Fix breaks

* Extension management fixes

* Fix breaks in windows bundling

* Fix/skip failing tests

* Update distro

* Add clear to nuget.config

* Add hygiene task

* Bump distro

* Fix hygiene issue

* Add build to hygiene exclusion

* Update distro

* Update hygiene

* Hygiene exclusions

* Update tsconfig

* Bump distro for server breaks

* Update build config

* Update darwin path

* Add done calls to notebook tests

* Skip failing tests

* Disable smoke tests
This commit is contained in:
Karl Burtram
2021-02-09 16:15:05 -08:00
committed by GitHub
parent 6f192f9af5
commit ce612a3d96
1929 changed files with 68012 additions and 34564 deletions

View File

@@ -57,19 +57,19 @@ export class TableOfContentsProvider {
const toc: TocEntry[] = [];
const tokens = await this.engine.parse(document);
const slugCount = new Map<string, number>();
const existingSlugEntries = new Map<string, { count: number }>();
for (const heading of tokens.filter(token => token.type === 'heading_open')) {
const lineNumber = heading.map[0];
const line = document.lineAt(lineNumber);
let slug = githubSlugifier.fromHeading(line.text);
if (slugCount.has(slug.value)) {
const count = slugCount.get(slug.value)!;
slugCount.set(slug.value, count + 1);
slug = githubSlugifier.fromHeading(slug.value + '-' + (count + 1));
const existingSlugEntry = existingSlugEntries.get(slug.value);
if (existingSlugEntry) {
++existingSlugEntry.count;
slug = githubSlugifier.fromHeading(slug.value + '-' + existingSlugEntry.count);
} else {
slugCount.set(slug.value, 0);
existingSlugEntries.set(slug.value, { count: 0 });
}
toc.push({
@@ -91,7 +91,7 @@ export class TableOfContentsProvider {
break;
}
}
const endLine = end !== undefined ? end : document.lineCount - 1;
const endLine = end ?? document.lineCount - 1;
return {
...entry,
location: new vscode.Location(document.uri,