Allow toc comment markers

This commit is contained in:
Tom Parker-Shemilt 2022-07-31 20:32:03 +01:00
parent 8140ff1030
commit 3f05bcef2e
1 changed files with 7 additions and 4 deletions

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