Merge pull request #906 from rust-lang-nursery/fix/typo
fixes typo in code
This commit is contained in:
commit
c6220fba83
|
@ -241,7 +241,7 @@ impl MDBook {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Register a [`Preprocessor`](../preprocess/trait.Preprocessor.html) to be used when rendering the book.
|
/// Register a [`Preprocessor`](../preprocess/trait.Preprocessor.html) to be used when rendering the book.
|
||||||
pub fn with_preprecessor<P: Preprocessor + 'static>(&mut self, preprocessor: P) -> &mut Self {
|
pub fn with_preprocessor<P: Preprocessor + 'static>(&mut self, preprocessor: P) -> &mut Self {
|
||||||
self.preprocessors.push(Box::new(preprocessor));
|
self.preprocessors.push(Box::new(preprocessor));
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@ fn mdbook_runs_preprocessors() {
|
||||||
let cfg = Config::default();
|
let cfg = Config::default();
|
||||||
|
|
||||||
let mut book = MDBook::load_with_config(temp.path(), cfg).unwrap();
|
let mut book = MDBook::load_with_config(temp.path(), cfg).unwrap();
|
||||||
book.with_preprecessor(Spy(Arc::clone(&spy)));
|
book.with_preprocessor(Spy(Arc::clone(&spy)));
|
||||||
book.build().unwrap();
|
book.build().unwrap();
|
||||||
|
|
||||||
let inner = spy.lock().unwrap();
|
let inner = spy.lock().unwrap();
|
||||||
|
|
|
@ -36,7 +36,7 @@ fn ask_the_preprocessor_to_blow_up() {
|
||||||
let dummy_book = DummyBook::new();
|
let dummy_book = DummyBook::new();
|
||||||
let temp = dummy_book.build().unwrap();
|
let temp = dummy_book.build().unwrap();
|
||||||
let mut md = MDBook::load(temp.path()).unwrap();
|
let mut md = MDBook::load(temp.path()).unwrap();
|
||||||
md.with_preprecessor(example());
|
md.with_preprocessor(example());
|
||||||
|
|
||||||
md.config
|
md.config
|
||||||
.set("preprocessor.nop-preprocessor.blow-up", true)
|
.set("preprocessor.nop-preprocessor.blow-up", true)
|
||||||
|
@ -52,7 +52,7 @@ fn process_the_dummy_book() {
|
||||||
let dummy_book = DummyBook::new();
|
let dummy_book = DummyBook::new();
|
||||||
let temp = dummy_book.build().unwrap();
|
let temp = dummy_book.build().unwrap();
|
||||||
let mut md = MDBook::load(temp.path()).unwrap();
|
let mut md = MDBook::load(temp.path()).unwrap();
|
||||||
md.with_preprecessor(example());
|
md.with_preprocessor(example());
|
||||||
|
|
||||||
md.build().unwrap();
|
md.build().unwrap();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue