[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
|
@ -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…
Reference in New Issue