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

@ -98,7 +98,8 @@ async fn process_updates(
let Some(file_contents) = contents else {
return;
};
let Ok(as_json) = serde_json::from_str::<VSSnippetsFile>(&file_contents) else {
let Ok(as_json) = serde_json_lenient::from_str::<VSSnippetsFile>(&file_contents)
else {
return;
};
let snippets = file_to_snippets(as_json);