Correct table pretty-printing.

This commit is contained in:
Michael Färber 2025-01-21 16:58:58 +01:00
parent 1c10342a37
commit cf06237556
2 changed files with 4 additions and 6 deletions

View File

@ -120,7 +120,10 @@ fn write_element(w: &mut Writer, element: &HtmlElement) -> SourceResult<()> {
/// Whether the element should be pretty-printed. /// Whether the element should be pretty-printed.
fn is_pretty(element: &HtmlElement) -> bool { 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. /// Escape a character.

View File

@ -522,11 +522,6 @@ pub mod tag {
| self::p | self::p
| self::pre | self::pre
| self::search | self::search
| self::table
| self::thead
| self::tbody
| self::tfoot
| self::tr
) )
} }