diff options
| author | Laurenz <laurmaedje@gmail.com> | 2025-06-24 17:52:15 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-24 15:52:15 +0000 |
| commit | f2f527c451b1b05b393af99b89c528aadb203ce6 (patch) | |
| tree | bad5d6f5de768e1d04680267618b0cf78fec64a5 /crates/typst-html/src/encode.rs | |
| parent | 9e3c1199edddc0422d34a266681d2efe1babd0c1 (diff) | |
Also fix encoding of `<textarea>` (#6497)
Diffstat (limited to 'crates/typst-html/src/encode.rs')
| -rw-r--r-- | crates/typst-html/src/encode.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/typst-html/src/encode.rs b/crates/typst-html/src/encode.rs index adcb6e03..9c793836 100644 --- a/crates/typst-html/src/encode.rs +++ b/crates/typst-html/src/encode.rs @@ -113,7 +113,7 @@ fn write_element(w: &mut Writer, element: &HtmlElement) -> SourceResult<()> { /// Encodes the children of an element. fn write_children(w: &mut Writer, element: &HtmlElement) -> SourceResult<()> { // See HTML spec ยง 13.1.2.5. - if element.tag == tag::pre && starts_with_newline(element) { + if matches!(element.tag, tag::pre | tag::textarea) && starts_with_newline(element) { w.buf.push('\n'); } |
