diff options
| author | Laurenz <laurmaedje@gmail.com> | 2025-01-06 14:55:34 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-06 13:55:34 +0000 |
| commit | cb8d862a55601127a1e3ff02feaefdabd37b583f (patch) | |
| tree | 098013eee3b3d0a3dacf7e47c81566121005df30 /crates/typst-html/src/encode.rs | |
| parent | e8bbf3794fb077cdd35095467eb763b476ee7e99 (diff) | |
Terminate pretty-printed HTML with trailing newline (#5661)
Diffstat (limited to 'crates/typst-html/src/encode.rs')
| -rw-r--r-- | crates/typst-html/src/encode.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/typst-html/src/encode.rs b/crates/typst-html/src/encode.rs index b87b0e1d..62146f86 100644 --- a/crates/typst-html/src/encode.rs +++ b/crates/typst-html/src/encode.rs @@ -12,6 +12,9 @@ pub fn html(document: &HtmlDocument) -> SourceResult<String> { w.buf.push_str("<!DOCTYPE html>"); write_indent(&mut w); write_element(&mut w, &document.root)?; + if w.pretty { + w.buf.push('\n'); + } Ok(w.buf) } |
