Skip to content

Commit 5863b75

Browse files
committed
Workaround for Swift 5.8 compiler failure
1 parent a8776db commit 5863b75

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Sources/SwiftFormat/Core/DocumentationComment.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,16 +150,13 @@ public struct DocumentationComment {
150150
private init(parameterMarkup markup: Markup) {
151151
// Extract the first paragraph as the brief summary. It will *not* be included in the body
152152
// nodes.
153-
let remainingChildren: DropFirstSequence<MarkupChildren>
154153
if let firstParagraph = markup.child(through: [(0, Paragraph.self)]) {
155154
briefSummary = firstParagraph.detachedFromParent as? Paragraph
156-
remainingChildren = markup.children.dropFirst()
155+
bodyNodes = markup.children.dropFirst().map { $0.detachedFromParent }
157156
} else {
158157
briefSummary = nil
159-
remainingChildren = markup.children.dropFirst(0)
158+
bodyNodes = markup.children.map { $0.detachedFromParent }
160159
}
161-
162-
bodyNodes = remainingChildren.map(\.detachedFromParent)
163160
}
164161

165162
/// Extracts parameter fields in an outlined parameters list (i.e., `- Parameters:` containing a

0 commit comments

Comments
 (0)