Skip to content

Commit

Permalink
fix: don't err if auto_render_languages isn't set (#454)
Browse files Browse the repository at this point in the history
Fixes #453
  • Loading branch information
mfontanini authored Feb 15, 2025
2 parents 5507ea4 + b6e393c commit 8e0bc18
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 0 additions & 3 deletions config-file-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,6 @@
},
"OptionsConfig": {
"type": "object",
"required": [
"auto_render_languages"
],
"properties": {
"auto_render_languages": {
"description": "Assume snippets for these languages contain `+render` and render them automatically.",
Expand Down
6 changes: 6 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ pub struct OptionsConfig {
pub strict_front_matter_parsing: Option<bool>,

/// Assume snippets for these languages contain `+render` and render them automatically.
#[serde(default)]
pub auto_render_languages: Vec<SnippetLanguage>,
}

Expand Down Expand Up @@ -510,4 +511,9 @@ mod test {
let config = KeyBindingsConfig::default();
CommandKeyBindings::try_from(config).expect("construction failed");
}

#[test]
fn default_options_serde() {
serde_yaml::from_str::<'_, OptionsConfig>("implicit_slide_ends: true").expect("failed to parse");
}
}

0 comments on commit 8e0bc18

Please sign in to comment.