snippets: Fix snippets not updating while containing comments (#23755)

Closes #23699

Release Notes:

- Fixed issue where snippets would not update when a snippets file
contained comments.
This commit is contained in:
loczek 2025-01-28 10:37:48 +01:00 committed by GitHub
parent bb59e7f217
commit b99159c59b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 8 additions and 6 deletions

View file

@ -5,7 +5,7 @@ use schemars::{
JsonSchema,
};
use serde::Deserialize;
use serde_json::Value;
use serde_json_lenient::Value;
#[derive(Deserialize)]
pub struct VSSnippetsFile {
@ -20,7 +20,7 @@ impl VSSnippetsFile {
.into_generator()
.into_root_schema_for::<Self>();
serde_json::to_value(schema).unwrap()
serde_json_lenient::to_value(schema).unwrap()
}
}