first steps in supporting markdown preview

This commit is contained in:
Johannes Rieken
2016-01-21 17:12:28 +01:00
parent 13eaadc104
commit 04643f8788
3 changed files with 25 additions and 6 deletions

View File

@@ -126,7 +126,7 @@ export function toViewColumn(position?: EditorPosition): vscode.ViewColumn {
export function fromFormattedString(value: vscode.MarkedString): IHTMLContentElement {
if (typeof value === 'string') {
return { formattedText: value };
return { markdown: value };
} else if (typeof value === 'object') {
return { code: value };
}
@@ -136,8 +136,8 @@ export function toFormattedString(value: IHTMLContentElement): vscode.MarkedStri
if (typeof value.code === 'string') {
return value.code;
}
let {formattedText, text} = value;
return formattedText || text || '<???>';
let {markdown, text} = value;
return markdown || text || '<???>';
}
function isMarkedStringArr(something: vscode.MarkedString | vscode.MarkedString[]): something is vscode.MarkedString[] {