File tree 4 files changed +7
-8
lines changed
Utility/FoundationExtensions
SwiftDocCUtilities/Action/Actions/Merge
4 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ public class DocumentationContext {
144
144
case . legacy( let legacyDataProvider) :
145
145
return try legacyDataProvider. contentsOfURL ( url, in: bundle)
146
146
case . new( let dataProvider) :
147
- assert ( self . bundle? . identifier == bundle. identifier , " New code shouldn't pass unknown bundle identifiers to 'DocumentationContext.bundle(identifier:)'. " )
147
+ assert ( self . bundle? . id == bundle. id , " New code shouldn't pass unknown bundle identifiers to 'DocumentationContext.bundle(identifier:)'. " )
148
148
return try dataProvider. contents ( of: url)
149
149
}
150
150
}
@@ -392,7 +392,7 @@ public class DocumentationContext {
392
392
case . legacy( let legacyDataProvider) :
393
393
return legacyDataProvider. bundles [ identifier]
394
394
case . new:
395
- assert ( bundle? . identifier == identifier, " New code shouldn't pass unknown bundle identifiers to 'DocumentationContext.bundle(identifier:)'. " )
395
+ assert ( bundle? . id . rawValue == identifier, " New code shouldn't pass unknown bundle identifiers to 'DocumentationContext.bundle(identifier:)'. " )
396
396
return bundle? . id. rawValue == identifier ? bundle : nil
397
397
}
398
398
}
Original file line number Diff line number Diff line change 1
1
/*
2
2
This source file is part of the Swift.org open source project
3
3
4
- Copyright (c) 2021 Apple Inc. and the Swift project authors
4
+ Copyright (c) 2021-2024 Apple Inc. and the Swift project authors
5
5
Licensed under Apache License v2.0 with Runtime Library Exception
6
6
7
7
See https://swift.org/LICENSE.txt for license information
@@ -18,13 +18,13 @@ extension StringProtocol {
18
18
}
19
19
20
20
/// A copy of the string appended with a slash ("/") if the string doesn't already end with a trailing slash.
21
- var appendingTrailingSlash : String {
21
+ package var appendingTrailingSlash : String {
22
22
guard !hasSuffix( " / " ) else { return String ( self ) }
23
23
return self . appending ( " / " )
24
24
}
25
25
26
26
/// A copy of the string without a leading slash ("/") or the original string if it doesn't start with a leading slash.
27
- var removingLeadingSlash : String {
27
+ package var removingLeadingSlash : String {
28
28
guard hasPrefix ( " / " ) else { return String ( self ) }
29
29
return String ( dropFirst ( ) )
30
30
}
Original file line number Diff line number Diff line change 10
10
11
11
import Foundation
12
12
import XCTest
13
- @ testable import SwiftDocC
13
+ import SwiftDocC
14
14
15
15
/// A Data provider and file manager that accepts pre-built documentation bundles with files on the local filesystem.
16
16
///
@@ -321,7 +321,7 @@ package class TestFileSystem: FileManagerProtocol {
321
321
case invalidPath( String )
322
322
var errorDescription : String {
323
323
switch self {
324
- case . invalidPath( let path) : return " Invalid path \( path. singleQuoted ) "
324
+ case . invalidPath( let path) : return " Invalid path ' \( path) ' "
325
325
}
326
326
}
327
327
}
Original file line number Diff line number Diff line change @@ -67,7 +67,6 @@ extension MergeAction {
67
67
renderNode. metadata. title = name
68
68
renderNode. metadata. roleHeading = roleHeading
69
69
renderNode. metadata. role = " collection "
70
- renderNode. hierarchy = nil
71
70
renderNode. sections = [ ]
72
71
73
72
if rootRenderReferences. containsBothKinds {
You can’t perform that action at this time.
0 commit comments