From f8dc1ad3bdbe20ec25379427e6afba36c75ec08c Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 23 Jun 2025 14:30:22 +0200 Subject: Handle pre elements that start with a newline --- tests/ref/html/html-pre-starting-with-newline.html | 17 +++++++++++++++++ tests/suite/html/syntax.typ | 5 +++++ 2 files changed, 22 insertions(+) create mode 100644 tests/ref/html/html-pre-starting-with-newline.html (limited to 'tests') 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 @@ + + + + + + + +
hello
+
+
+hello
+
+
+
+hello
+ + 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") -- cgit v1.2.3