91
92
appendLink(target: URI | string, label: string, title?: string): MarkdownString {
94
>
this.value += this._escape(label, ']');
95
>
this.value += '](';
96
>
this.value += this._escape(String(target), ')');
97
>
if (title) {
98
this.value += ` "${this._escape(this._escape(title, '"'), ')')}"`;
99
}
101
>
return this;
102
>
}
103
104
private _escape(value: string, ch: string): string {
105
>
const r = new RegExp(escapeRegExpCharacters(ch), 'g');
htmlContent.ts
106
>
return value.replace(r, (match, offset) => {
107
if (value.charAt(offset - 1) !== '\\') {
108
return `\\${match}`;