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:
parent
bb59e7f217
commit
b99159c59b
5 changed files with 8 additions and 6 deletions
|
@ -37,7 +37,8 @@ impl SnippetRegistry {
|
|||
}
|
||||
|
||||
pub fn register_snippets(&self, file_path: &Path, contents: &str) -> Result<()> {
|
||||
let snippets_in_file: crate::format::VSSnippetsFile = serde_json::from_str(contents)?;
|
||||
let snippets_in_file: crate::format::VSSnippetsFile =
|
||||
serde_json_lenient::from_str(contents)?;
|
||||
let kind = file_path
|
||||
.file_stem()
|
||||
.and_then(|stem| stem.to_str().and_then(file_stem_to_key));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue