mirror of
https://github.com/typst/typst
synced 2025-08-06 19:27:55 +08:00
Correct table pretty-printing.
This commit is contained in:
parent
1c10342a37
commit
cf06237556
@ -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.
|
||||||
|
@ -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
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user