File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,11 @@ def _render(self) -> list[str]:
111
111
112
112
return [
113
113
'<!--' ,
114
- * util .escape_string (self .comment_data ).splitlines (),
114
+ * util .increase_indent (
115
+ util .escape_string (self .comment_data ).splitlines (),
116
+ # FIXME: Yucky magic number
117
+ 2 ,
118
+ ),
115
119
'-->'
116
120
]
117
121
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ def test_renders_properties():
53
53
def test_comment_renders ():
54
54
assert str (Comment ("Hello world" )) == '\n ' .join ([
55
55
'<!--' ,
56
- 'Hello world' ,
56
+ ' Hello world' ,
57
57
'-->' ,
58
58
])
59
59
@@ -115,3 +115,10 @@ def test_larger_page():
115
115
' </body>' ,
116
116
'</html>' ,
117
117
])
118
+
119
+
120
+ def test_format_through_repr ():
121
+ """Is HTML rendered through repr?"""
122
+ doc = html ()
123
+
124
+ assert repr (doc ) == "<html></html>"
You can’t perform that action at this time.
0 commit comments