diff --git a/CHANGELOG.md b/CHANGELOG.md index 265c6efa..4a226fc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ ### 🐞 Fixes - [#302](https://github.com/estruyf/vscode-front-matter/issues/302): Fix for spinner when navigating between tabs +- [#304](https://github.com/estruyf/vscode-front-matter/issues/304): Fix yaml stringify which caused additional fields to be added ## [7.0.0] - 2022-03-21 - [Release notes](https://beta.frontmatter.codes/updates/v7.0.0) diff --git a/src/helpers/ArticleHelper.ts b/src/helpers/ArticleHelper.ts index 7e6ddf5d..1418bf48 100644 --- a/src/helpers/ArticleHelper.ts +++ b/src/helpers/ArticleHelper.ts @@ -289,6 +289,8 @@ export class ArticleHelper { * @returns The new file path */ public static createContent(contentType: ContentType | undefined, folderPath: string, titleValue: string, fileExtension?: string): string | undefined { + FrontMatterParser.currentContent = null; + const prefix = Settings.get(SETTING_TEMPLATES_PREFIX); const fileType = Settings.get(SETTING_CONTENT_DEFAULT_FILETYPE); diff --git a/src/helpers/ContentType.ts b/src/helpers/ContentType.ts index c3fafed3..fa32b064 100644 --- a/src/helpers/ContentType.ts +++ b/src/helpers/ContentType.ts @@ -11,7 +11,6 @@ import { DEFAULT_CONTENT_TYPE_NAME } from "../constants/ContentType"; import { Telemetry } from './Telemetry'; import { processKnownPlaceholders } from './PlaceholderHelper'; - export class ContentType { /** @@ -100,7 +99,6 @@ export class ContentType { * @returns */ private static async create(contentType: IContentType, folderPath: string) { - const titleValue = await Questions.ContentTitle(); if (!titleValue) { return;