mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
Terminate pretty-printed HTML with trailing newline (#5661)
This commit is contained in:
parent
e8bbf3794f
commit
cb8d862a55
@ -12,6 +12,9 @@ pub fn html(document: &HtmlDocument) -> SourceResult<String> {
|
|||||||
w.buf.push_str("<!DOCTYPE html>");
|
w.buf.push_str("<!DOCTYPE html>");
|
||||||
write_indent(&mut w);
|
write_indent(&mut w);
|
||||||
write_element(&mut w, &document.root)?;
|
write_element(&mut w, &document.root)?;
|
||||||
|
if w.pretty {
|
||||||
|
w.buf.push('\n');
|
||||||
|
}
|
||||||
Ok(w.buf)
|
Ok(w.buf)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,4 +27,4 @@
|
|||||||
Level 7
|
Level 7
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -18,4 +18,4 @@
|
|||||||
Contact <a href="mailto:hi@typst.app">hi@typst.app</a> or call <a href="tel:123">123</a> for more information.
|
Contact <a href="mailto:hi@typst.app">hi@typst.app</a> or call <a href="tel:123">123</a> for more information.
|
||||||
</p>
|
</p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user