[book] Prevent over-matching in gitignore rule

To only ignore the output destination (default: `book`) and no other
file/directory with the same name under the mdbook root, we should
prefix the gitignore rule with a leading slash (default: `/book`).
This commit is contained in:
Behnam Esfahbod 2017-08-30 16:01:43 -07:00
parent 313f9b9403
commit 40a4840867
1 changed files with 1 additions and 1 deletions

View File

@ -223,7 +223,7 @@ impl MDBook {
debug!("[*]: Writing to .gitignore");
writeln!(f, "{}", relative).expect("Could not write to file.");
writeln!(f, "/{}", relative).expect("Could not write to file.");
}
}