diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45a271c0..13080c74 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,8 +13,7 @@ jobs: strategy: matrix: xcode: - - "11.7" # Swift 5.2 - - "12.2" # Swift 5.3 + - "12.4" # Swift 5.3 name: "macOS Big Sur (Xcode ${{ matrix.xcode }})" @@ -42,8 +41,7 @@ jobs: strategy: matrix: xcode: - - "11.7" # Swift 5.2 - - "12" # Swift 5.3 + - "12.4" # Swift 5.3 name: "macOS Catalina (Xcode ${{ matrix.xcode }})" @@ -70,7 +68,7 @@ jobs: strategy: matrix: - swift: ["5.3", "5.2"] + swift: ["5.3"] name: "Linux (Swift ${{ matrix.swift }})" diff --git a/Brewfile.lock.json b/Brewfile.lock.json index 5ef7c8be..6920ca1a 100644 --- a/Brewfile.lock.json +++ b/Brewfile.lock.json @@ -2,28 +2,30 @@ "entries": { "brew": { "graphviz": { - "version": "2.47.0", + "version": "2.47.1", "bottle": { "rebuild": 0, - "cellar": "/usr/local/Cellar", - "prefix": "/usr/local", - "root_url": "https://homebrew.bintray.com/bottles", + "root_url": "https://ghcr.io/v2/homebrew/core", "files": { "arm64_big_sur": { - "url": "https://homebrew.bintray.com/bottles/graphviz-2.47.0.arm64_big_sur.bottle.tar.gz", - "sha256": "e4263e38be3d51648bffba45b0572dafd16254ce27fc3d1b13c555dff1110d5a" + "cellar": "/opt/homebrew/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/graphviz/blobs/sha256:d9830966d41ef07d40f0a269597051dc3bd317f1f834f8eebf220d7fee6e06cb", + "sha256": "d9830966d41ef07d40f0a269597051dc3bd317f1f834f8eebf220d7fee6e06cb" }, "big_sur": { - "url": "https://homebrew.bintray.com/bottles/graphviz-2.47.0.big_sur.bottle.tar.gz", - "sha256": "7972126b79753efa1f0c3519d6a063079cb1ff02c69759864a865e4ae6b4f193" + "cellar": "/usr/local/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/graphviz/blobs/sha256:41c4fe36cca429a201173d6f282bbc3e12ac9ae397736da75f2beb5c4c0d2e33", + "sha256": "41c4fe36cca429a201173d6f282bbc3e12ac9ae397736da75f2beb5c4c0d2e33" }, "catalina": { - "url": "https://homebrew.bintray.com/bottles/graphviz-2.47.0.catalina.bottle.tar.gz", - "sha256": "e5d3b7b652e5cf828c0a2afc2fadb31090f3d7f10389766857404b4359b695e3" + "cellar": "/usr/local/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/graphviz/blobs/sha256:4010170a67db373c8aaf6d2d4cc4767ed74963fbedf33641e672414f49af6a9b", + "sha256": "4010170a67db373c8aaf6d2d4cc4767ed74963fbedf33641e672414f49af6a9b" }, "mojave": { - "url": "https://homebrew.bintray.com/bottles/graphviz-2.47.0.mojave.bottle.tar.gz", - "sha256": "d045a9a68315b4e3fa61c7a0a813da345be8197892d070162d909f4985ff3bd7" + "cellar": "/usr/local/Cellar", + "url": "https://ghcr.io/v2/homebrew/core/graphviz/blobs/sha256:a6dfb7964c7776134a100467120aa190fe45415b53a704b2a372d0b82e1d2bc6", + "sha256": "a6dfb7964c7776134a100467120aa190fe45415b53a704b2a372d0b82e1d2bc6" } } } @@ -66,6 +68,14 @@ "CLT": "12.4.0.0.1.1610135815", "Xcode": "12.4", "macOS": "10.15.7" + }, + "big_sur": { + "HOMEBREW_VERSION": "3.1.3", + "HOMEBREW_PREFIX": "/usr/local", + "Homebrew/homebrew-core": "f668b627f8d03499447661e6f87c7c15bb597ab8", + "CLT": "12.4.0.0.1.1610135815", + "Xcode": "12.5", + "macOS": "11.2.3" } } } diff --git a/Dockerfile b/Dockerfile index 4b27b183..1f656e89 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM swift:5.2 as builder +FROM swift:5.3 as builder WORKDIR /swiftdoc COPY . . RUN apt-get -qq update && apt-get install -y libxml2-dev && rm -r /var/lib/apt/lists/* diff --git a/Package.resolved b/Package.resolved index 6a1d96cb..464933f7 100644 --- a/Package.resolved +++ b/Package.resolved @@ -6,8 +6,8 @@ "repositoryURL": "https://github.com/SwiftDocOrg/CommonMark.git", "state": { "branch": null, - "revision": "62176a332884826997928ba578d9d322c16772fb", - "version": "0.4.0" + "revision": "1c8f3983c12b848e0d84b3a7a1d6f9a735e6661a", + "version": "0.5.0" } }, { @@ -15,8 +15,8 @@ "repositoryURL": "https://github.com/SwiftDocOrg/GraphViz.git", "state": { "branch": null, - "revision": "cf52b27bf7086e9ca5665cef0de57d0481bbab41", - "version": "0.3.0" + "revision": "e9a73a30755c3c5b26ba7c73312b1f2ccb9a1a30", + "version": "0.4.0" } }, { @@ -42,8 +42,8 @@ "repositoryURL": "https://github.com/apple/swift-argument-parser.git", "state": { "branch": null, - "revision": "92646c0cdbaca076c8d3d0207891785b3379cbff", - "version": "0.3.1" + "revision": "9564d61b08a5335ae0a36f789a7d71493eacadfc", + "version": "0.3.2" } }, { @@ -51,8 +51,8 @@ "repositoryURL": "https://github.com/SwiftDocOrg/swift-cmark.git", "state": { "branch": null, - "revision": "2a766030bee955b4806044fd7aca1b6884475138", - "version": "0.28.3+20200110.2a76603" + "revision": "9c8096a23f44794bde297452d87c455fc4f76d42", + "version": "0.29.0+20210102.9c8096a" } }, { @@ -87,8 +87,8 @@ "repositoryURL": "https://github.com/SwiftDocOrg/SwiftMarkup.git", "state": { "branch": null, - "revision": "7915d17608dd32434dc8abb95156f70367f38a5a", - "version": "0.2.1" + "revision": "bc71bde93b5217833c8ed13d5cf1e0c60f1367a7", + "version": "0.3.0" } }, { @@ -96,16 +96,16 @@ "repositoryURL": "https://github.com/SwiftDocOrg/SwiftSemantics.git", "state": { "branch": null, - "revision": "4fdc48bddbbb8311079ed111e5a4f2b92423b05c", - "version": "0.1.0" + "revision": "2f571ccc67e0789d23f8adbccb6a18a6ff3b166c", + "version": "0.3.0" } }, { "package": "SwiftSyntaxHighlighter", "repositoryURL": "https://github.com/NSHipster/SwiftSyntaxHighlighter.git", "state": { - "branch": "1.1.3", - "revision": "b086ef5066b6f799f9c7d6d7fc1553581b55ef1e", + "branch": "1.2.2", + "revision": "175923d005df00dc76c3c191bd7977c066a5288c", "version": null } } diff --git a/Package.swift b/Package.swift index 885058fb..b444a489 100644 --- a/Package.swift +++ b/Package.swift @@ -14,13 +14,13 @@ let package = Package( ], dependencies: [ .package(name: "SwiftSyntax", url: "https://github.com/apple/swift-syntax.git", .revision("0.50300.0")), - .package(url: "https://github.com/SwiftDocOrg/SwiftSemantics.git", .upToNextMinor(from: "0.1.0")), - .package(url: "https://github.com/SwiftDocOrg/CommonMark.git", .upToNextMinor(from: "0.4.0")), - .package(url: "https://github.com/SwiftDocOrg/SwiftMarkup.git", .upToNextMinor(from: "0.2.1")), - .package(url: "https://github.com/SwiftDocOrg/GraphViz.git", .upToNextMinor(from: "0.3.0")), + .package(url: "https://github.com/SwiftDocOrg/SwiftSemantics.git", .upToNextMinor(from: "0.3.0")), + .package(url: "https://github.com/SwiftDocOrg/CommonMark.git", .upToNextMinor(from: "0.5.0")), + .package(url: "https://github.com/SwiftDocOrg/SwiftMarkup.git", .upToNextMinor(from: "0.3.0")), + .package(url: "https://github.com/SwiftDocOrg/GraphViz.git", .upToNextMinor(from: "0.4.0")), .package(url: "https://github.com/NSHipster/HypertextLiteral.git", .upToNextMinor(from: "0.0.2")), .package(url: "https://github.com/SwiftDocOrg/Markup.git", .upToNextMinor(from: "0.0.3")), - .package(url: "https://github.com/NSHipster/SwiftSyntaxHighlighter.git", .revision("1.1.3")), + .package(url: "https://github.com/NSHipster/SwiftSyntaxHighlighter.git", .revision("1.2.2")), .package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMinor(from: "0.3.1")), .package(url: "https://github.com/apple/swift-log.git", .upToNextMinor(from: "1.4.2")), .package(name: "LoggingGitHubActions", url: "https://github.com/NSHipster/swift-log-github-actions.git", .upToNextMinor(from: "0.0.1")), diff --git a/Package@swift-5.2.swift b/Package@swift-5.2.swift deleted file mode 100644 index d3981b5b..00000000 --- a/Package@swift-5.2.swift +++ /dev/null @@ -1,51 +0,0 @@ -// swift-tools-version:5.1 -// The swift-tools-version declares the minimum version of Swift required to build this package. - -import PackageDescription - -let package = Package( - name: "swift-doc", - products: [ - .executable(name: "swift-doc", targets: ["swift-doc"]), - .library(name: "SwiftDoc", targets: ["SwiftDoc"]) - ], - dependencies: [ - .package(url: "https://github.com/apple/swift-syntax.git", .revision("0.50200.0")), - .package(url: "https://github.com/SwiftDocOrg/SwiftSemantics.git", .upToNextMinor(from: "0.1.0")), - .package(url: "https://github.com/SwiftDocOrg/CommonMark.git", .upToNextMinor(from: "0.4.0")), - .package(url: "https://github.com/SwiftDocOrg/SwiftMarkup.git", .upToNextMinor(from: "0.2.1")), - .package(url: "https://github.com/SwiftDocOrg/GraphViz.git", .upToNextMinor(from: "0.3.0")), - .package(url: "https://github.com/NSHipster/HypertextLiteral.git", .upToNextMinor(from: "0.0.2")), - .package(url: "https://github.com/SwiftDocOrg/Markup.git", .upToNextMinor(from: "0.0.3")), - .package(url: "https://github.com/NSHipster/SwiftSyntaxHighlighter.git", .revision("1.0.2")), - .package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMinor(from: "0.3.1")), - .package(url: "https://github.com/apple/swift-log.git", .upToNextMinor(from: "1.2.0")), - .package(url: "https://github.com/NSHipster/swift-log-github-actions.git", .upToNextMinor(from: "0.0.1")), - ], - targets: [ - // Targets are the basic building blocks of a package. A target can define a module or a test suite. - // Targets can depend on other targets in this package, and on products in packages which this package depends on. - .target( - name: "swift-doc", - dependencies: ["ArgumentParser", "SwiftDoc", "SwiftSemantics", "SwiftMarkup", "CommonMarkBuilder", "HypertextLiteral", "Markup", "DCOV", "GraphViz", "SwiftSyntaxHighlighter", "Logging", "LoggingGitHubActions"] - ), - .target( - name: "DCOV", - dependencies: [] - ), - .target( - name: "SwiftDoc", - dependencies: ["SwiftSyntax", "SwiftSemantics", "SwiftMarkup"] - ), - .testTarget( - name: "SwiftDocTests", - dependencies: ["SwiftDoc", "SwiftSyntax", "SwiftSemantics", "SwiftMarkup"] - ), - .testTarget( - name: "EndToEndTests", - dependencies: [ - .target(name: "swift-doc"), - ] - ), - ] -) diff --git a/Package@swift-5.4.swift b/Package@swift-5.4.swift new file mode 100644 index 00000000..f0bd3b7f --- /dev/null +++ b/Package@swift-5.4.swift @@ -0,0 +1,77 @@ +// swift-tools-version:5.3 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "swift-doc", + platforms: [ + .macOS(.v11) + ], + products: [ + .executable(name: "swift-doc", targets: ["swift-doc"]), + .library(name: "SwiftDoc", targets: ["SwiftDoc"]) + ], + dependencies: [ + .package(name: "SwiftSyntax", url: "https://github.com/apple/swift-syntax.git", .revision("release/5.4")), + .package(url: "https://github.com/SwiftDocOrg/SwiftSemantics.git", .revision("0.3.0")), + .package(url: "https://github.com/SwiftDocOrg/CommonMark.git", .upToNextMinor(from: "0.5.0")), + .package(url: "https://github.com/SwiftDocOrg/SwiftMarkup.git", .upToNextMinor(from: "0.3.0")), + .package(url: "https://github.com/SwiftDocOrg/GraphViz.git", .upToNextMinor(from: "0.4.0")), + .package(url: "https://github.com/NSHipster/HypertextLiteral.git", .upToNextMinor(from: "0.0.2")), + .package(url: "https://github.com/SwiftDocOrg/Markup.git", .upToNextMinor(from: "0.0.3")), + .package(url: "https://github.com/NSHipster/SwiftSyntaxHighlighter.git", .revision("1.2.2")), + .package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMinor(from: "0.3.1")), + .package(url: "https://github.com/apple/swift-log.git", .upToNextMinor(from: "1.4.2")), + .package(name: "LoggingGitHubActions", url: "https://github.com/NSHipster/swift-log-github-actions.git", .upToNextMinor(from: "0.0.1")), + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "swift-doc", + dependencies: [ + .target(name: "SwiftDoc"), + .target(name: "DCOV"), + .product(name: "ArgumentParser", package: "swift-argument-parser"), + .product(name: "SwiftSemantics", package: "SwiftSemantics"), + .product(name: "SwiftMarkup", package: "SwiftMarkup"), + .product(name: "CommonMarkBuilder", package: "CommonMark"), + .product(name: "HypertextLiteral", package: "HypertextLiteral"), + .product(name: "Markup", package: "Markup"), + .product(name: "GraphViz", package: "GraphViz"), + .product(name: "SwiftSyntaxHighlighter", package: "SwiftSyntaxHighlighter"), + .product(name: "Logging", package: "swift-log"), + .product(name: "LoggingGitHubActions", package: "LoggingGitHubActions") + ] + ), + .target( + name: "DCOV", + dependencies: [] + ), + .target( + name: "SwiftDoc", + dependencies: [ + .product(name: "SwiftSyntax", package: "SwiftSyntax"), + .product(name: "SwiftSemantics", package: "SwiftSemantics"), + .product(name: "SwiftMarkup", package: "SwiftMarkup"), + .product(name: "SwiftSyntaxHighlighter", package: "SwiftSyntaxHighlighter") + ] + ), + .testTarget( + name: "SwiftDocTests", + dependencies: [ + .target(name: "SwiftDoc"), + .product(name: "SwiftSyntax", package: "SwiftSyntax"), + .product(name: "SwiftSemantics", package: "SwiftSemantics"), + .product(name: "SwiftMarkup", package: "SwiftMarkup") + ] + ), + .testTarget( + name: "EndToEndTests", + dependencies: [ + .target(name: "swift-doc"), + ] + ), + ] +) diff --git a/README.md b/README.md index 6c2d89db..377e20f9 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ as well as top-level type aliases, functions, and variables. ## Requirements -- Swift 5.3 +- Swift 5.3+ - [libxml2][libxml2] - [GraphViz][graphviz] _(optional)_ diff --git a/Sources/swift-doc/Supporting Types/Components/Abstract.swift b/Sources/swift-doc/Supporting Types/Components/Abstract.swift index 0e2e1527..72255671 100644 --- a/Sources/swift-doc/Supporting Types/Components/Abstract.swift +++ b/Sources/swift-doc/Supporting Types/Components/Abstract.swift @@ -48,7 +48,7 @@ struct Abstract: Component {
- \#(commonmark: symbol.documentation?.summary ?? "") + \#(commonmark: symbol.documentation?.summary?.description ?? "")
"""# } diff --git a/Sources/swift-doc/Supporting Types/Components/Documentation.swift b/Sources/swift-doc/Supporting Types/Components/Documentation.swift index 96bfa686..3bc07fe0 100644 --- a/Sources/swift-doc/Supporting Types/Components/Documentation.swift +++ b/Sources/swift-doc/Supporting Types/Components/Documentation.swift @@ -36,7 +36,7 @@ struct Documentation: Component { } if documentation.summary != nil { - Fragment { "\(documentation.summary!.escapingEmojiShortcodes)" } + Fragment { "\(documentation.summary!.description.escapingEmojiShortcodes)" } } Declaration(of: symbol, in: module, baseURL: baseURL) @@ -49,7 +49,7 @@ struct Documentation: Component { Section { Heading { "Parameters" } List(of: documentation.parameters) { parameter in - Fragment { "\(parameter.name): \(parameter.content)" } + Fragment { "\(parameter.name): \(parameter.content.description)" } } } } @@ -57,14 +57,14 @@ struct Documentation: Component { if documentation.throws != nil { Section { Heading { "Throws" } - Fragment { documentation.throws!.escapingEmojiShortcodes } + Fragment { documentation.throws!.description.escapingEmojiShortcodes } } } if documentation.returns != nil { Section { Heading { "Returns" } - Fragment { documentation.returns!.escapingEmojiShortcodes } + Fragment { documentation.returns!.description.escapingEmojiShortcodes } } } @@ -90,7 +90,7 @@ struct Documentation: Component { if let summary = documentation.summary { fragments.append(#"""
- \#(commonmark: summary) + \#(commonmark: summary.description)
"""# as HypertextLiteral.HTML) } @@ -119,7 +119,7 @@ struct Documentation: Component { type = nil } - return (entry.name, type, entry.content) + return (entry.name, type, entry.content.description) } fragments.append(#""" @@ -158,14 +158,14 @@ struct Documentation: Component { if let `throws` = documentation.throws { fragments.append(#"""

Throws

- \#(commonmark: `throws`) + \#(commonmark: `throws`.description) """# as HypertextLiteral.HTML) } if let `returns` = documentation.returns { fragments.append(#"""

Returns

- \#(commonmark: `returns`) + \#(commonmark: `returns`.description) """# as HypertextLiteral.HTML) } @@ -223,6 +223,10 @@ extension Documentation { return Fragment { paragraph.render(format: .commonmark) } + case .thematicBreak(let thematicBreak): + return Fragment { + thematicBreak.render(format: .commonmark) + } } } @@ -257,6 +261,9 @@ extension Documentation { return HTML(list.render(format: .html, options: [.unsafe])) case .paragraph(let paragraph): return HTML(paragraph.render(format: .html, options: [.unsafe])) + case .thematicBreak(let thematicBreak): + return HTML(thematicBreak.render(format: .html, options: [.unsafe])) + } } } diff --git a/Sources/swift-doc/Supporting Types/Components/Relationships.swift b/Sources/swift-doc/Supporting Types/Components/Relationships.swift index 6fd8f23d..116adc2a 100644 --- a/Sources/swift-doc/Supporting Types/Components/Relationships.swift +++ b/Sources/swift-doc/Supporting Types/Components/Relationships.swift @@ -125,7 +125,7 @@ struct Relationships: Component { } else { return #"""
\#(symbol.id)
-
\#(commonmark: symbol.documentation?.summary ?? "")
+
\#(commonmark: symbol.documentation?.summary?.description ?? "")
"""# } }) diff --git a/Tests/SwiftDocTests/SourceFileTests.swift b/Tests/SwiftDocTests/SourceFileTests.swift index dd647f24..203c42d4 100644 --- a/Tests/SwiftDocTests/SourceFileTests.swift +++ b/Tests/SwiftDocTests/SourceFileTests.swift @@ -65,7 +65,7 @@ final class SourceFileTests: XCTestCase { do { let `protocol` = sourceFile.symbols[0] XCTAssert(`protocol`.api is Protocol) - XCTAssertEqual(`protocol`.documentation?.summary, "Protocol") + XCTAssertEqual(`protocol`.documentation?.summary?.description, "Protocol\n") do { let function = sourceFile.symbols[1] @@ -76,7 +76,7 @@ final class SourceFileTests: XCTestCase { XCTAssert(function.context.first is Symbol) XCTAssertEqual(function.context.first as? Symbol, `protocol`) - XCTAssertEqual(function.documentation?.summary, "Function requirement") + XCTAssertEqual(function.documentation?.summary?.description, "Function requirement\n") } do { @@ -88,14 +88,14 @@ final class SourceFileTests: XCTestCase { XCTAssert(property.context.first is Symbol) XCTAssertEqual(property.context.first as? Symbol, `protocol`) - XCTAssertEqual(property.documentation?.summary, "Property requirement") + XCTAssertEqual(property.documentation?.summary?.description, "Property requirement\n") } } do { let enumeration = sourceFile.symbols[3] XCTAssert(enumeration.api is Enumeration) - XCTAssertEqual(enumeration.documentation?.summary, "Enumeration") + XCTAssertEqual(enumeration.documentation?.summary?.description, "Enumeration\n") do { let `case` = sourceFile.symbols[4] @@ -106,14 +106,14 @@ final class SourceFileTests: XCTestCase { XCTAssert(`case`.context.first is Symbol) XCTAssertEqual(`case`.context.first as? Symbol, enumeration) - XCTAssertEqual(`case`.documentation?.summary, "Enumeration case") + XCTAssertEqual(`case`.documentation?.summary?.description, "Enumeration case\n") } } do { let structure = sourceFile.symbols[5] XCTAssert(structure.api is Structure) - XCTAssertEqual(structure.documentation?.summary, "Structure") + XCTAssertEqual(structure.documentation?.summary?.description, "Structure\n") } do { @@ -126,7 +126,7 @@ final class SourceFileTests: XCTestCase { XCTAssert(function.context.first is Extension) XCTAssertEqual((function.context.first as? Extension)?.extendedType, "S") - XCTAssertEqual(function.documentation?.summary, "Function") + XCTAssertEqual(function.documentation?.summary?.description, "Function\n") } do { @@ -138,14 +138,14 @@ final class SourceFileTests: XCTestCase { XCTAssert(property.context.first is Extension) XCTAssertEqual((property.context.first as? Extension)?.extendedType, "S") - XCTAssertEqual(property.documentation?.summary, "Property") + XCTAssertEqual(property.documentation?.summary?.description, "Property\n") } } do { let `class` = sourceFile.symbols[8] XCTAssert(`class`.api is Class) - XCTAssertEqual(`class`.documentation?.summary, "Class") + XCTAssertEqual(`class`.documentation?.summary?.description, "Class\n") do { let function = sourceFile.symbols[9] @@ -156,7 +156,7 @@ final class SourceFileTests: XCTestCase { XCTAssert(function.context.first is Symbol) XCTAssertEqual(function.context.first as? Symbol, `class`) - XCTAssertEqual(function.documentation?.summary, "Function") + XCTAssertEqual(function.documentation?.summary?.description, "Function\n") } do { @@ -168,7 +168,7 @@ final class SourceFileTests: XCTestCase { XCTAssert(property.context.first is Symbol) XCTAssertEqual(property.context.first as? Symbol, `class`) - XCTAssertEqual(property.documentation?.summary, "Property") + XCTAssertEqual(property.documentation?.summary?.description, "Property\n") } } @@ -176,7 +176,7 @@ final class SourceFileTests: XCTestCase { let `class` = sourceFile.symbols[11] XCTAssert(`class`.api is Class) XCTAssertEqual((`class`.api as? Class)?.inheritance, ["C"]) - XCTAssertEqual(`class`.documentation?.summary, "Subclass") + XCTAssertEqual(`class`.documentation?.summary?.description, "Subclass\n") } } }