File tree Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -213,12 +213,13 @@ impl MDBook {
213213 . flat_map ( |x| vec ! [ x. 0 , x. 1 ] )
214214 . collect ( ) ;
215215
216- let temp_dir = TempFileBuilder :: new ( ) . prefix ( "mdbook" ) . tempdir ( ) ?;
216+ let temp_dir = TempFileBuilder :: new ( ) . prefix ( "mdbook- " ) . tempdir ( ) ?;
217217
218218 let preprocess_context = PreprocessorContext :: new ( self . root . clone ( ) , self . config . clone ( ) ) ;
219219
220220 LinkPreprocessor :: new ( ) . run ( & preprocess_context, & mut self . book ) ?;
221- IndexPreprocessor :: new ( ) . run ( & preprocess_context, & mut self . book ) ?;
221+ // Index Preprocessor is disabled so that chapter paths continue to point to the
222+ // actual markdown files.
222223
223224 for item in self . iter ( ) {
224225 if let BookItem :: Chapter ( ref ch) = * item {
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ impl DummyBook {
4747 /// Write a book to a temporary directory using the provided settings.
4848 pub fn build ( & self ) -> Result < TempDir > {
4949 let temp = TempFileBuilder :: new ( )
50- . prefix ( "dummy_book" )
50+ . prefix ( "dummy_book- " )
5151 . tempdir ( )
5252 . chain_err ( || "Unable to create temp directory" ) ?;
5353
Original file line number Diff line number Diff line change 11# Summary
22
3- [ dummy_book ] ( README.md )
3+ [ Dummy Book ] ( README.md )
44[ Introduction] ( intro.md )
55
66- [ First Chapter] ( first/index.md )
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ fn mdbook_can_correctly_test_a_passing_book() {
2323#[ test]
2424fn mdbook_detects_book_with_failing_tests ( ) {
2525 let temp = DummyBook :: new ( ) . with_passing_test ( false ) . build ( ) . unwrap ( ) ;
26- let mut md: MDBook = MDBook :: load ( temp. path ( ) ) . unwrap ( ) ;
26+ let mut md = MDBook :: load ( temp. path ( ) ) . unwrap ( ) ;
2727
2828 assert ! ( md. test( vec![ ] ) . is_err( ) ) ;
2929}
You can’t perform that action at this time.
0 commit comments