#528 - fix for astro files

This commit is contained in:
Elio Struyf
2023-03-19 19:56:06 +01:00
parent a66bf12a24
commit 781db743dc
2 changed files with 6 additions and 2 deletions
+1
View File
@@ -42,6 +42,7 @@
- [#520](https://github.com/estruyf/vscode-front-matter/issues/520): Add the URL protocol to the host on opening the preview if it's missing
- [#521](https://github.com/estruyf/vscode-front-matter/issues/521): Fix empty snippets dashboard placeholder
- [#526](https://github.com/estruyf/vscode-front-matter/issues/526): Fix card content menu
- [#528](https://github.com/estruyf/vscode-front-matter/issues/528): Fix where the `.astro` code section `---` is seen as front matter
- [#529](https://github.com/estruyf/vscode-front-matter/issues/529): Fix YAML parsing in Windows which added an extra carriage return
- [#531](https://github.com/estruyf/vscode-front-matter/issues/531): Fix prettier update which caused data views to not render list items
- [#539](https://github.com/estruyf/vscode-front-matter/issues/539): Fix the override of the default file prefix on content creation
+5 -2
View File
@@ -135,9 +135,7 @@ export class DataListener extends BaseListener {
}
}
// if (JSON.stringify(DataListener.lastMetadataUpdate) !== JSON.stringify(updatedMetadata)) {
this.sendMsg(Command.metadata, updatedMetadata);
// }
DataListener.lastMetadataUpdate = updatedMetadata;
}
@@ -299,6 +297,11 @@ export class DataListener extends BaseListener {
return '';
}
// Check if the file is a valid article
if (!ArticleHelper.isSupportedFile()) {
return;
}
const article = ArticleHelper.getFrontMatter(editor);
if (article?.data) {
this.pushMetadata(article!.data);