diff options
author | Ben Bridle <bridle.benjamin@gmail.com> | 2025-01-08 14:15:41 +1300 |
---|---|---|
committer | Ben Bridle <bridle.benjamin@gmail.com> | 2025-01-08 14:15:41 +1300 |
commit | ec6ef10964fd605d7a911fee47bc3cc0a031bdaa (patch) | |
tree | 8d98fdafce4cdb1b6893109195387505e0e38bf2 /src/generate_html.rs | |
parent | e95af5c04968d21147aa622173b1133d9c33f12f (diff) | |
download | toaster-ec6ef10964fd605d7a911fee47bc3cc0a031bdaa.zip |
Wrap table sections with <tbody>
Each section of a table is now wrapped with <tbody>, instead of just
the entire table.
Diffstat (limited to 'src/generate_html.rs')
-rw-r--r-- | src/generate_html.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/generate_html.rs b/src/generate_html.rs index 05456d0..84c3bdb 100644 --- a/src/generate_html.rs +++ b/src/generate_html.rs @@ -125,8 +125,8 @@ pub fn document_to_html(document: &MarkdownDocument, page: &Page, website: &Webs tag!("th", column.name); }) ); - wrap!("tbody", for section in &table.sections { - for row in section { + for section in &table.sections { + wrap!("tbody", for row in section { wrap!("tr", for (column, cell) in std::iter::zip(&table.columns, row) { let text_raw = line_to_html!(cell); let text = match text_raw.as_str() { @@ -148,8 +148,8 @@ pub fn document_to_html(document: &MarkdownDocument, page: &Page, website: &Webs }; html!("<td class='{}'>{}</td>", class, text); }) - } - }); + }) + }; }) } } |