mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Merge from vscode 4636be2b71c87bfb0bfe3c94278b447a5efcc1f1 (#8722)
* Merge from vscode 4636be2b71c87bfb0bfe3c94278b447a5efcc1f1 * remove tests that aren't working
This commit is contained in:
@@ -34,7 +34,7 @@ export function createCancelablePromise<T>(callback: (token: CancellationToken)
|
||||
});
|
||||
});
|
||||
|
||||
return new class implements CancelablePromise<T> {
|
||||
return <CancelablePromise<T>>new class {
|
||||
cancel() {
|
||||
source.cancel();
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import { equals } from 'vs/base/common/arrays';
|
||||
import { UriComponents } from 'vs/base/common/uri';
|
||||
import { escapeCodicons, markdownUnescapeCodicons } from 'vs/base/common/codicons';
|
||||
import { escapeCodicons } from 'vs/base/common/codicons';
|
||||
|
||||
export interface IMarkdownString {
|
||||
readonly value: string;
|
||||
@@ -39,10 +39,9 @@ export class MarkdownString implements IMarkdownString {
|
||||
|
||||
appendText(value: string): MarkdownString {
|
||||
// escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
|
||||
value = value
|
||||
this._value += (this._supportThemeIcons ? escapeCodicons(value) : value)
|
||||
.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&')
|
||||
.replace('\n', '\n\n');
|
||||
this._value += this.supportThemeIcons ? markdownUnescapeCodicons(value) : value;
|
||||
|
||||
return this;
|
||||
}
|
||||
@@ -61,10 +60,6 @@ export class MarkdownString implements IMarkdownString {
|
||||
this._value += '\n```\n';
|
||||
return this;
|
||||
}
|
||||
|
||||
static escapeThemeIcons(value: string): string {
|
||||
return escapeCodicons(value);
|
||||
}
|
||||
}
|
||||
|
||||
export function isEmptyMarkdownString(oneOrMany: IMarkdownString | IMarkdownString[] | null | undefined): boolean {
|
||||
|
||||
@@ -526,6 +526,14 @@ export class LinkedMap<K, V> {
|
||||
return this._size;
|
||||
}
|
||||
|
||||
get first(): V | undefined {
|
||||
return this._head?.value;
|
||||
}
|
||||
|
||||
get last(): V | undefined {
|
||||
return this._tail?.value;
|
||||
}
|
||||
|
||||
has(key: K): boolean {
|
||||
return this._map.has(key);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user