mirror of
https://github.com/rust-lang/mdBook
synced 2024-11-15 01:07:13 +00:00
Remove 'curly_quotes' key from the json config
This commit is contained in:
parent
d252dc82d6
commit
26fc980ffb
3 changed files with 7 additions and 31 deletions
|
@ -160,12 +160,6 @@ impl BookConfig {
|
|||
}
|
||||
}
|
||||
|
||||
if let Some(curly_quotes) = jsonconfig.curly_quotes {
|
||||
if let Some(htmlconfig) = self.get_mut_html_config() {
|
||||
htmlconfig.set_curly_quotes(curly_quotes);
|
||||
}
|
||||
}
|
||||
|
||||
self
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@ pub struct JsonConfig {
|
|||
pub description: Option<String>,
|
||||
|
||||
pub theme_path: Option<PathBuf>,
|
||||
pub curly_quotes: Option<bool>,
|
||||
pub google_analytics: Option<String>,
|
||||
}
|
||||
|
||||
|
@ -40,5 +39,3 @@ impl JsonConfig {
|
|||
return Ok(config);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -85,18 +85,3 @@ fn from_json_output_html_theme() {
|
|||
|
||||
assert_eq!(htmlconfig.get_theme().expect("the theme key was provided"), &PathBuf::from("root/theme"));
|
||||
}
|
||||
|
||||
// Tests that the `curly_quotes` key is correctly parsed in the JSON config
|
||||
#[test]
|
||||
fn from_json_output_html_curly_quotes() {
|
||||
let json = r#"{
|
||||
"curly_quotes": true
|
||||
}"#;
|
||||
|
||||
let parsed = JsonConfig::from_json(&json).expect("This should parse");
|
||||
let config = BookConfig::from_jsonconfig("root", parsed);
|
||||
|
||||
let htmlconfig = config.get_html_config().expect("There should be an HtmlConfig");
|
||||
|
||||
assert_eq!(htmlconfig.get_curly_quotes(), true);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue