Skip to content

Commit 1ecf031

Browse files
committed
fixed missing DOCTYPE
1 parent 27c07d8 commit 1ecf031

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

Benchmarks/Benchmarks/Elementary/Elementary.swift

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,25 @@ package struct ElementaryTests : HTMLGenerator {
1212
package init() {}
1313

1414
package func staticHTML() -> String {
15+
StaticView().render()
16+
}
17+
18+
package func dynamicHTML(_ context: HTMLContext) -> String {
19+
DynamicView(context: context).render()
20+
}
21+
}
22+
23+
struct StaticView: HTML {
24+
var content: some HTML {
25+
HTMLRaw("<!DOCTYPE html>")
1526
html {
1627
head {
1728
title { "StaticView" }
1829
}
1930
body {
2031
h1 { "Swift HTML Benchmarks" }
2132
}
22-
}.render()
23-
}
24-
25-
package func dynamicHTML(_ context: HTMLContext) -> String {
26-
DynamicView(context: context).render()
33+
}
2734
}
2835
}
2936

0 commit comments

Comments
 (0)