Refresh master with initial release/0.24 snapshot (#332)

* Initial port of release/0.24 source code

* Fix additional headers

* Fix a typo in launch.json
This commit is contained in:
Karl Burtram
2017-12-15 15:38:57 -08:00
committed by GitHub
parent 271b3a0b82
commit 6ad0df0e3e
7118 changed files with 107999 additions and 56466 deletions

View File

@@ -6,7 +6,6 @@
'use strict';
import { equals } from 'vs/base/common/arrays';
import { marked } from 'vs/base/common/marked/marked';
export interface IMarkdownString {
value: string;
@@ -56,7 +55,7 @@ export function isEmptyMarkdownString(oneOrMany: IMarkdownString | IMarkdownStri
export function isMarkdownString(thing: any): thing is IMarkdownString {
if (thing instanceof MarkdownString) {
return true;
} else if (typeof thing === 'object') {
} else if (thing && typeof thing === 'object') {
return typeof (<IMarkdownString>thing).value === 'string'
&& (typeof (<IMarkdownString>thing).isTrusted === 'boolean' || (<IMarkdownString>thing).isTrusted === void 0);
}
@@ -93,16 +92,3 @@ export function removeMarkdownEscapes(text: string): string {
}
return text.replace(/\\([\\`*_{}[\]()#+\-.!])/g, '$1');
}
export function containsCommandLink(value: string): boolean {
let uses = false;
const renderer = new marked.Renderer();
renderer.link = (href, title, text): string => {
if (href.match(/^command:/i)) {
uses = true;
}
return 'link';
};
marked(value, { renderer });
return uses;
}