Skip to content

Commit

Permalink
Fix issue with blankLines.
Browse files Browse the repository at this point in the history
  • Loading branch information
tjprescott committed Dec 12, 2024
1 parent 20fb2b7 commit bac1e81
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/swift/SwiftAPIViewCore/Sources/Models/APIViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,11 @@ class APIViewModel: Tokenizable, Encodable {
// if there are too many newlines, remove some
let linesToRemove = newlineCount - count
for _ in 0..<linesToRemove {
_ = parentLines.popLast()
if currentParent != nil {
_ = currentParent!.children.popLast()
} else {
_ = self.reviewLines.popLast()
}
}
} else {
// if not enough newlines, add some
Expand Down

0 comments on commit bac1e81

Please sign in to comment.