summaryrefslogtreecommitdiff
path: root/crates/typst-html
diff options
context:
space:
mode:
authorMichael Färber <01mf02@gmail.com>2025-01-23 13:08:48 +0100
committerGitHub <noreply@github.com>2025-01-23 12:08:48 +0000
commitdda486a412b31acbf767087c748a62ccc6b510b6 (patch)
tree5a4a8d8b9e901d6c61fcefa31061e54d74544ef6 /crates/typst-html
parent52ee33a275063369673d8802fb820db3825a661f (diff)
HTML tables (#5666)
Diffstat (limited to 'crates/typst-html')
-rw-r--r--crates/typst-html/src/encode.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/typst-html/src/encode.rs b/crates/typst-html/src/encode.rs
index 62146f86..71422a0f 100644
--- a/crates/typst-html/src/encode.rs
+++ b/crates/typst-html/src/encode.rs
@@ -120,7 +120,10 @@ fn write_element(w: &mut Writer, element: &HtmlElement) -> SourceResult<()> {
/// Whether the element should be pretty-printed.
fn is_pretty(element: &HtmlElement) -> bool {
- tag::is_block_by_default(element.tag) || matches!(element.tag, tag::meta)
+ matches!(
+ element.tag,
+ tag::meta | tag::table | tag::thead | tag::tbody | tag::tfoot | tag::tr
+ ) || tag::is_block_by_default(element.tag)
}
/// Escape a character.