mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-07-05 09:21:39 +02:00
#528 - fix for astro files
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user