Make theme parsing more lenient (#7154)

This PR improves the theme parsing to be a bit more lenient, allowing
things like comments and trailing commas in theme files.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-01-31 11:05:22 -05:00 committed by GitHub
parent 7cb97e57f9
commit 8c8a5ad275
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 5 additions and 2 deletions

View file

@ -34,6 +34,7 @@ schemars = { workspace = true, features = ["indexmap"] }
serde.workspace = true
serde_derive.workspace = true
serde_json.workspace = true
serde_json_lenient.workspace = true
serde_repr.workspace = true
settings = { path = "../settings" }
story = { path = "../story", optional = true }

View file

@ -259,7 +259,7 @@ impl ThemeRegistry {
continue;
};
let Some(theme) = serde_json::from_reader(reader).log_err() else {
let Some(theme) = serde_json_lenient::from_reader(reader).log_err() else {
continue;
};