diff --git a/CHANGELOG.md b/CHANGELOG.md index fef7a50d..cb362f78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ - [#647](https://github.com/estruyf/vscode-front-matter/issues/647): Fix the open in browser action on the preview - [#648](https://github.com/estruyf/vscode-front-matter/issues/648): Fix the global configuration reference to the URL of the schema file - [#651](https://github.com/estruyf/vscode-front-matter/issues/651): Fix settings listeners which did not push updates to the webviews +- [#657](https://github.com/estruyf/vscode-front-matter/issues/657): Fix correctly updating front matter with scripts outcome on Windows ## [9.1.0] - 2023-08-31 diff --git a/src/helpers/ArticleHelper.ts b/src/helpers/ArticleHelper.ts index 5201cb47..30264981 100644 --- a/src/helpers/ArticleHelper.ts +++ b/src/helpers/ArticleHelper.ts @@ -23,7 +23,7 @@ import { } from '../constants'; import { DumpOptions } from 'js-yaml'; import { FrontMatterParser, ParsedFrontMatter } from '../parsers'; -import { Extension, Logger, Settings, SlugHelper } from '.'; +import { Extension, Logger, Settings, SlugHelper, parseWinPath } from '.'; import { format, parse } from 'date-fns'; import { Notifications } from './Notifications'; import { Article } from '../commands'; @@ -110,7 +110,7 @@ export class ArticleHelper { * @param article */ public static async updateByPath(path: string, article: ParsedFrontMatter) { - const file = await workspace.openTextDocument(Uri.parse(path)); + const file = await workspace.openTextDocument(Uri.file(parseWinPath(path))); if (file) { const update = this.generateUpdate(file, article);