We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da2f23d commit d7a132aCopy full SHA for d7a132a
src/validate.rs
@@ -8,7 +8,7 @@ use linkcheck::{
8
};
9
use std::{
10
collections::HashMap,
11
- ffi::OsString,
+ ffi::{OsStr, OsString},
12
fmt::{self, Display, Formatter},
13
path::{Component, Path, PathBuf},
14
sync::Mutex,
@@ -85,8 +85,10 @@ fn ensure_included_in_book(
85
let part_of_the_book = resolved_link.starts_with(&src_dir);
86
let was_included_in_summary =
87
file_names.iter().any(|name| resolved_link.ends_with(name));
88
+ let ext = resolved_link.extension();
89
+ let is_marhdown = ext == Some(OsStr::new("md"));
90
- if !part_of_the_book || was_included_in_summary {
91
+ if !part_of_the_book || was_included_in_summary || !is_marhdown {
92
Ok(())
93
} else {
94
use std::io::{Error, ErrorKind};
0 commit comments