This commit is contained in:
12
src/law.rs
12
src/law.rs
@@ -65,14 +65,12 @@ fn print_header(header: Heading, level: usize) -> String {
|
||||
header_title
|
||||
));
|
||||
|
||||
match header.content {
|
||||
HeadingContent::Paragraph(p) => {
|
||||
for section in p {
|
||||
ret.push_str(&print_paragraph(section));
|
||||
for content in header.content {
|
||||
match content {
|
||||
HeadingContent::Paragraph(p) => {
|
||||
ret.push_str(&print_paragraph(p));
|
||||
}
|
||||
}
|
||||
HeadingContent::Heading(subheaders) => {
|
||||
for subheader in subheaders {
|
||||
HeadingContent::Heading(subheader) => {
|
||||
ret.push_str(&print_header(subheader, level + 1));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user