Skip to content

Commit

Permalink
Ignore draft chapters (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
naeu authored Sep 2, 2021
1 parent bf42dc7 commit 0bd1879
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/preprocessor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ impl Preprocessor for GraphvizPreprocessor {
// only continue editing the book if we don't have any errors
if error.is_ok() {
if let BookItem::Chapter(ref mut chapter) = item {
let path = chapter.path.as_ref().unwrap();
let path = match chapter.path.as_ref() {
Some(path) => path,
None => return,
};
let mut full_path = src_dir.join(path);

// remove the chapter filename
Expand Down

0 comments on commit 0bd1879

Please sign in to comment.