summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2025-06-23 14:30:22 +0200
committerLaurenz <laurmaedje@gmail.com>2025-06-23 15:56:01 +0200
commitf8dc1ad3bdbe20ec25379427e6afba36c75ec08c (patch)
tree84dca4a33f24d8ea065eff30d142263be9cfdcb6 /tests
parent9050ee1639a20463e3cafce58964c9ef0fa38205 (diff)
Handle pre elements that start with a newline
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/html/html-pre-starting-with-newline.html17
-rw-r--r--tests/suite/html/syntax.typ5
2 files changed, 22 insertions, 0 deletions
diff --git a/tests/ref/html/html-pre-starting-with-newline.html b/tests/ref/html/html-pre-starting-with-newline.html
new file mode 100644
index 00000000..676d1a80
--- /dev/null
+++ b/tests/ref/html/html-pre-starting-with-newline.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ </head>
+ <body>
+ <pre>hello</pre>
+ <pre>
+
+hello</pre>
+ <pre>
+
+
+hello</pre>
+ </body>
+</html>
diff --git a/tests/suite/html/syntax.typ b/tests/suite/html/syntax.typ
index c95fa06e..fb5caf3b 100644
--- a/tests/suite/html/syntax.typ
+++ b/tests/suite/html/syntax.typ
@@ -5,3 +5,8 @@
--- html-void-element-with-children html ---
// Error: 2-27 HTML void elements must not have children
#html.elem("img", [Hello])
+
+--- html-pre-starting-with-newline html ---
+#html.pre("hello")
+#html.pre("\nhello")
+#html.pre("\n\nhello")