Skip to content

Commit 2a4e514

Browse files
authored
Merge pull request #2689 from ehuss/revert-multilingual
Revert: Remove the book.multilingual field and don't serialize it
2 parents 9822c2a + 3c10b00 commit 2a4e514

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

examples/nop-preprocessor.rs

+1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ mod nop_lib {
117117
"book": {
118118
"authors": ["AUTHOR"],
119119
"language": "en",
120+
"multilingual": false,
120121
"src": "src",
121122
"title": "TITLE"
122123
},

src/config.rs

+8
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,11 @@ pub struct BookConfig {
420420
pub description: Option<String>,
421421
/// Location of the book source relative to the book's root directory.
422422
pub src: PathBuf,
423+
/// Does this book support more than one language?
424+
// TODO: Remove this field in 0.5, it is unused:
425+
// https://github.com/rust-lang/mdBook/issues/2636
426+
#[serde(skip_serializing)]
427+
pub multilingual: bool,
423428
/// The main language of the book.
424429
pub language: Option<String>,
425430
/// The direction of text in the book: Left-to-right (LTR) or Right-to-left (RTL).
@@ -434,6 +439,7 @@ impl Default for BookConfig {
434439
authors: Vec::new(),
435440
description: None,
436441
src: PathBuf::from("src"),
442+
multilingual: false,
437443
language: Some(String::from("en")),
438444
text_direction: None,
439445
}
@@ -817,6 +823,7 @@ mod tests {
817823
title = "Some Book"
818824
authors = ["Michael-F-Bryan <[email protected]>"]
819825
description = "A completely useless book"
826+
multilingual = true
820827
src = "source"
821828
language = "ja"
822829
@@ -855,6 +862,7 @@ mod tests {
855862
title: Some(String::from("Some Book")),
856863
authors: vec![String::from("Michael-F-Bryan <[email protected]>")],
857864
description: Some(String::from("A completely useless book")),
865+
multilingual: true,
858866
src: PathBuf::from("source"),
859867
language: Some(String::from("ja")),
860868
text_direction: None,

0 commit comments

Comments
 (0)