We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8840cb commit d367cdfCopy full SHA for d367cdf
src/rustdoc/gen.rs
@@ -50,6 +50,7 @@ fn write_mod(
50
ctxt: ctxt,
51
moddoc: doc::moddoc
52
) {
53
+ write_header(ctxt, #fmt("Module `%s`", moddoc.name));
54
write_mod_contents(ctxt, moddoc);
55
}
56
@@ -140,4 +141,13 @@ mod tests {
140
141
let markdown = write_markdown_str(doc);
142
assert str::contains(markdown, "## Function `func`");
143
144
+
145
+ #[test]
146
+ fn write_markdown_should_write_mod_headers() {
147
+ let source = "mod moo { }";
148
+ let ast = parse::from_str(source);
149
+ let doc = extract::extract(ast, "");
150
+ let markdown = write_markdown_str(doc);
151
+ assert str::contains(markdown, "## Module `moo`");
152
+ }
153
0 commit comments