Skip to content

Commit

Permalink
swiftformat
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler committed Jul 9, 2024
1 parent 78fac26 commit e4b24b4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/Mustache/Template+Render.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ extension MustacheTemplate {
switch token {
case .text(let text):
return text

case .variable(let variable, let transform):
if let child = getChild(named: variable, transform: transform, context: context) {
if let template = child as? MustacheTemplate {
Expand All @@ -56,6 +57,7 @@ extension MustacheTemplate {
return context.contentType.escapeText(String(describing: child))
}
}

case .unescapedVariable(let variable, let transform):
if let child = getChild(named: variable, transform: transform, context: context) {
if let renderable = child as? MustacheCustomRenderable {
Expand All @@ -64,6 +66,7 @@ extension MustacheTemplate {
return String(describing: child)
}
}

case .section(let variable, let transform, let template):
let child = self.getChild(named: variable, transform: transform, context: context)
return self.renderSection(child, with: template, context: context)
Expand Down

0 comments on commit e4b24b4

Please sign in to comment.