diff options
| author | Laurenz <laurmaedje@gmail.com> | 2025-01-23 23:18:02 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-23 22:18:02 +0000 |
| commit | cd044825fcb1651781f1dbcafac4dec8b216e370 (patch) | |
| tree | 8d721ce7ce519fb6d9cb87c3adedc857236de450 /crates/typst-library/src/model/table.rs | |
| parent | 6fe1e20afb9e2fb276242613121206b0001cce82 (diff) | |
Handle boxes and blocks a bit better in HTML export (#5744)
Co-authored-by: Martin Haug <3874949+reknih@users.noreply.github.com>
Diffstat (limited to 'crates/typst-library/src/model/table.rs')
| -rw-r--r-- | crates/typst-library/src/model/table.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/typst-library/src/model/table.rs b/crates/typst-library/src/model/table.rs index ba792442..82c1cc08 100644 --- a/crates/typst-library/src/model/table.rs +++ b/crates/typst-library/src/model/table.rs @@ -9,7 +9,7 @@ use crate::foundations::{ cast, elem, scope, Content, NativeElement, Packed, Show, Smart, StyleChain, TargetElem, }; -use crate::html::{tag, HtmlAttr, HtmlAttrs, HtmlElem, HtmlTag}; +use crate::html::{attr, tag, HtmlAttrs, HtmlElem, HtmlTag}; use crate::introspection::Locator; use crate::layout::grid::resolve::{table_to_cellgrid, Cell, CellGrid, Entry}; use crate::layout::{ @@ -268,10 +268,10 @@ fn show_cell_html(tag: HtmlTag, cell: &Cell, styles: StyleChain) -> Content { let mut attrs = HtmlAttrs::default(); let span = |n: NonZeroUsize| (n != NonZeroUsize::MIN).then(|| n.to_string()); if let Some(colspan) = span(cell.colspan(styles)) { - attrs.push(HtmlAttr::constant("colspan"), colspan); + attrs.push(attr::colspan, colspan); } if let Some(rowspan) = span(cell.rowspan(styles)) { - attrs.push(HtmlAttr::constant("rowspan"), rowspan); + attrs.push(attr::rowspan, rowspan); } HtmlElem::new(tag) .with_body(Some(cell.body.clone())) |
