@@ -40,7 +40,7 @@ pub struct MDBook {
40
40
pub book : Book ,
41
41
renderers : Vec < Box < dyn Renderer > > ,
42
42
43
- /// List of pre-processors to be run on the book
43
+ /// List of pre-processors to be run on the book.
44
44
preprocessors : Vec < Box < dyn Preprocessor > > ,
45
45
}
46
46
@@ -78,7 +78,7 @@ impl MDBook {
78
78
MDBook :: load_with_config ( book_root, config)
79
79
}
80
80
81
- /// Load a book from its root directory using a custom config .
81
+ /// Load a book from its root directory using a custom `Config` .
82
82
pub fn load_with_config < P : Into < PathBuf > > ( book_root : P , config : Config ) -> Result < MDBook > {
83
83
let root = book_root. into ( ) ;
84
84
@@ -97,7 +97,7 @@ impl MDBook {
97
97
} )
98
98
}
99
99
100
- /// Load a book from its root directory using a custom config and a custom summary.
100
+ /// Load a book from its root directory using a custom `Config` and a custom summary.
101
101
pub fn load_with_config_and_summary < P : Into < PathBuf > > (
102
102
book_root : P ,
103
103
config : Config ,
@@ -121,7 +121,7 @@ impl MDBook {
121
121
}
122
122
123
123
/// Returns a flat depth-first iterator over the elements of the book,
124
- /// it returns an [ BookItem enum](bookitem.html) :
124
+ /// it returns a [` BookItem`] enum:
125
125
/// `(section: String, bookitem: &BookItem)`
126
126
///
127
127
/// ```no_run
@@ -180,7 +180,7 @@ impl MDBook {
180
180
Ok ( ( ) )
181
181
}
182
182
183
- /// Run the entire build process for a particular `Renderer`.
183
+ /// Run the entire build process for a particular [ `Renderer`] .
184
184
pub fn execute_build_process ( & self , renderer : & dyn Renderer ) -> Result < ( ) > {
185
185
let mut preprocessed_book = self . book . clone ( ) ;
186
186
let preprocess_ctx = PreprocessorContext :: new (
@@ -219,14 +219,14 @@ impl MDBook {
219
219
}
220
220
221
221
/// You can change the default renderer to another one by using this method.
222
- /// The only requirement is for your renderer to implement the [`Renderer`
223
- /// trait](../renderer/trait.Renderer.html)
222
+ /// The only requirement is that your renderer implement the [`Renderer`]
223
+ /// trait.
224
224
pub fn with_renderer < R : Renderer + ' static > ( & mut self , renderer : R ) -> & mut Self {
225
225
self . renderers . push ( Box :: new ( renderer) ) ;
226
226
self
227
227
}
228
228
229
- /// Register a [`Preprocessor`](../preprocess/trait.Preprocessor.html) to be used when rendering the book.
229
+ /// Register a [`Preprocessor`] to be used when rendering the book.
230
230
pub fn with_preprocessor < P : Preprocessor + ' static > ( & mut self , preprocessor : P ) -> & mut Self {
231
231
self . preprocessors . push ( Box :: new ( preprocessor) ) ;
232
232
self
@@ -303,7 +303,7 @@ impl MDBook {
303
303
/// artefacts.
304
304
///
305
305
/// If there is only 1 renderer, put it in the directory pointed to by the
306
- /// `build.build_dir` key in `Config`. If there is more than one then the
306
+ /// `build.build_dir` key in [ `Config`] . If there is more than one then the
307
307
/// renderer gets its own directory within the main build dir.
308
308
///
309
309
/// i.e. If there were only one renderer (in this case, the HTML renderer):
0 commit comments