Skip to content

Commit e43c0c2

Browse files
David KellermannV1dV1d
authored andcommitted
fix: keep attributes on modules when using --dump
1 parent d2dadac commit e43c0c2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/item.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,21 @@ impl Display for Item<'_> {
4545
write!(f, " {relative}")
4646
}
4747
Self::Module {
48+
doc,
49+
groups,
4850
name,
4951
relative,
5052
optional,
5153
..
5254
} => {
55+
if let Some(docstr) = doc {
56+
writeln!(f, "# {docstr}")?;
57+
}
58+
59+
if !groups.is_empty() {
60+
writeln!(f, "[group('{}')]", groups.first().unwrap())?;
61+
}
62+
5363
write!(f, "mod")?;
5464

5565
if *optional {

0 commit comments

Comments
 (0)