File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: b8840cbee603786107aa627eed4edcfc1c644b93
2
+ refs/heads/master: d367cdf1d9c641576aae9e612acc126ae6573b66
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ fn write_mod(
50
50
ctxt : ctxt ,
51
51
moddoc : doc:: moddoc
52
52
) {
53
+ write_header ( ctxt, #fmt ( "Module `%s`" , moddoc. name ) ) ;
53
54
write_mod_contents ( ctxt, moddoc) ;
54
55
}
55
56
@@ -140,4 +141,13 @@ mod tests {
140
141
let markdown = write_markdown_str ( doc) ;
141
142
assert str:: contains ( markdown, "## Function `func`" ) ;
142
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
+ }
143
153
}
You can’t perform that action at this time.
0 commit comments