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