#657 - Windows script outcome fix

This commit is contained in:
Elio Struyf
2023-09-08 13:29:41 +02:00
parent 160d901358
commit a2d1100123
2 changed files with 3 additions and 2 deletions

View File

@@ -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

View File

@@ -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);