Skip to content

Commit 0a670cf

Browse files
authored
Merge pull request #806 from TomaszLizer/fix/initial-pass-highlight-issue
2 parents 8eb55c1 + 133931a commit 0a670cf

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Sources/Ignite/Elements/Document.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@ public struct Document: MarkupElement {
2727
attributes.append(customAttributes: .init(name: "lang", value: language.rawValue))
2828
var output = "<!doctype html>"
2929
output += "<html\(attributes)>"
30-
output += head.markupString()
31-
output += body.markupString()
30+
let bodyMarkup = body.markup()
31+
// Deferred head rendering to accommodate for context updates during body rendering
32+
let headMarkup = head.markup()
33+
output += headMarkup.string
34+
output += bodyMarkup.string
3235
output += "</html>"
3336
return Markup(output)
3437
}

0 commit comments

Comments
 (0)