From c7b4147ba73830c7532e69fad98a9f22d5151102 Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Sun, 1 Jan 2017 16:00:21 -0800 Subject: [PATCH] Watch both book.json and book.toml --- src/bin/mdbook.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bin/mdbook.rs b/src/bin/mdbook.rs index 27d5313d..33b22913 100644 --- a/src/bin/mdbook.rs +++ b/src/bin/mdbook.rs @@ -332,6 +332,10 @@ fn trigger_on_change(book: &mut MDBook, closure: F) -> () if let Err(_) = watcher.watch(book.get_root().join("book.json"), NonRecursive) { // do nothing if book.json is not found } + if let Err(_) = watcher.watch(book.get_root().join("book.toml"), NonRecursive) { + // do nothing if book.toml is not found + } + println!("\nListening for changes...\n"); loop {