[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:
parent
313f9b9403
commit
40a4840867
1 changed files with 1 additions and 1 deletions
|
|
@ -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.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue