1
0
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:
Tom Parker-Shemilt 2022-07-31 20:32:03 +01:00
parent 8140ff1030
commit 3f05bcef2e

View File

@ -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
));
}
}
_ => {}
}