Skip to content

Commit

Permalink
Fix variable ambiguity (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xTim authored Aug 8, 2021
1 parent e57cde5 commit 79e2652
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sources/LeafKit/LeafSerialize/LeafSerializer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,17 @@ internal struct LeafSerializer {
userInfo: self.userInfo
)

guard let tag = self.tags[tag.name] else {
guard let foundTag = self.tags[tag.name] else {
try? LeafData("#\(tag.name)").serialize(buffer: &self.buffer)
return
}

let leafData: LeafData

if tag is UnsafeUnescapedLeafTag {
leafData = try tag.render(sub)
if foundTag is UnsafeUnescapedLeafTag {
leafData = try foundTag.render(sub)
} else {
leafData = try tag.render(sub).htmlEscaped()
leafData = try foundTag.render(sub).htmlEscaped()
}

try? leafData.serialize(buffer: &self.buffer)
Expand Down

0 comments on commit 79e2652

Please sign in to comment.