mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-21 17:19:01 +01:00
Deprecate the previewFrontMatter setting
Switch to always hiding the frontmatter and then allowing markdown-it plugins to render it properly if they wish. `previewFrontMatter: "show"` is also not very useful since it usually results in a jumble of text at the top of the file This is required with the new performance work to avoid re-tokenizing the document multiple times during rendering
This commit is contained in:
@@ -12,7 +12,6 @@ export class MarkdownPreviewConfiguration {
|
||||
|
||||
public readonly scrollBeyondLastLine: boolean;
|
||||
public readonly wordWrap: boolean;
|
||||
public readonly previewFrontMatter: string;
|
||||
public readonly lineBreaks: boolean;
|
||||
public readonly doubleClickToSwitchToEditor: boolean;
|
||||
public readonly scrollEditorWithPreview: boolean;
|
||||
@@ -36,7 +35,6 @@ export class MarkdownPreviewConfiguration {
|
||||
this.wordWrap = markdownEditorConfig['editor.wordWrap'] !== 'off';
|
||||
}
|
||||
|
||||
this.previewFrontMatter = markdownConfig.get<string>('previewFrontMatter', 'hide');
|
||||
this.scrollPreviewWithEditor = !!markdownConfig.get<boolean>('preview.scrollPreviewWithEditor', true);
|
||||
this.scrollEditorWithPreview = !!markdownConfig.get<boolean>('preview.scrollEditorWithPreview', true);
|
||||
this.lineBreaks = !!markdownConfig.get<boolean>('preview.breaks', false);
|
||||
|
||||
@@ -68,7 +68,7 @@ export class MarkdownContentProvider {
|
||||
const nonce = new Date().getTime() + '' + new Date().getMilliseconds();
|
||||
const csp = this.getCspForResource(sourceUri, nonce);
|
||||
|
||||
const body = await this.engine.render(markdownDocument, config.previewFrontMatter === 'hide');
|
||||
const body = await this.engine.render(markdownDocument);
|
||||
return `<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
Reference in New Issue
Block a user