use crate::doctest::{Collector, TestOptions};
use crate::html::escape::Escape;
use crate::html::markdown;
-use crate::html::markdown::{find_testable_code, ErrorCodes, IdMap, Markdown, MarkdownWithToc};
+use crate::html::markdown::{
+ find_testable_code, ErrorCodes, HeadingOffset, IdMap, Markdown, MarkdownWithToc,
+};
/// Separate any lines at the start of the file that begin with `# ` or `%`.
fn extract_leading_metadata(s: &str) -> (Vec<&str>, &str) {
let text = if !options.markdown_no_toc {
MarkdownWithToc(text, &mut ids, error_codes, edition, &playground).into_string()
} else {
- Markdown(text, &[], &mut ids, error_codes, edition, &playground).into_string()
+ Markdown {
+ content: text,
+ links: &[],
+ ids: &mut ids,
+ error_codes,
+ edition,
+ playground: &playground,
+ heading_offset: HeadingOffset::H1,
+ }
+ .into_string()
};
let err = write!(