mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-16 13:21:04 +01:00
11 lines
623 B
TypeScript
11 lines
623 B
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
'use strict';
|
|
|
|
import { MarkedString } from 'vscode';
|
|
|
|
export function textToMarkedString(text: string): MarkedString {
|
|
return text.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
|
|
} |