mirror of
https://github.com/rust-unofficial/awesome-rust.git
synced 2025-01-29 22:01:07 +02:00
Allow toc comment markers
This commit is contained in:
parent
8140ff1030
commit
3f05bcef2e
11
src/main.rs
11
src/main.rs
@ -597,10 +597,13 @@ async fn main() -> Result<(), Error> {
|
||||
}
|
||||
}
|
||||
Event::Html(content) => {
|
||||
return Err(format_err!(
|
||||
"Contains HTML content, not markdown: {}",
|
||||
content
|
||||
));
|
||||
// Allow ToC markers, nothing else
|
||||
if !content.contains("<!-- toc") {
|
||||
return Err(format_err!(
|
||||
"Contains HTML content, not markdown: {}",
|
||||
content
|
||||
));
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user