mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
💄 #29076
This commit is contained in:
@@ -33,15 +33,11 @@ export class MarkdownString implements IMarkdownString {
|
||||
}
|
||||
|
||||
appendText(value: string): this {
|
||||
this.value += textToMarkedString(value);
|
||||
// escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
|
||||
this.value += value.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&');
|
||||
return this;
|
||||
}
|
||||
|
||||
// appendMarkdown(value: string): this {
|
||||
// this.value += value;
|
||||
// return this;
|
||||
// }
|
||||
|
||||
appendCodeblock(langId: string, code: string): this {
|
||||
this.value += '```';
|
||||
this.value += langId;
|
||||
@@ -76,10 +72,6 @@ function markdownStringEqual(a: IMarkdownString, b: IMarkdownString): boolean {
|
||||
}
|
||||
}
|
||||
|
||||
export function textToMarkedString(text: string): string {
|
||||
return text.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
|
||||
}
|
||||
|
||||
export function removeMarkdownEscapes(text: string): string {
|
||||
if (!text) {
|
||||
return text;
|
||||
|
||||
Reference in New Issue
Block a user