Skip to content

Commit 57a8a12

Browse files
review: add a comment for urlWasDecoded
1 parent e19159b commit 57a8a12

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Sources/SwiftDocC/Model/Rendering/Tutorial/References/DownloadReference.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ public struct DownloadReference: RenderReference, URLReference, Equatable {
2727
/// The location of the downloadable resource.
2828
public var url: URL
2929

30+
/// Indicates whether the ``url`` property was loaded from the regular initializer or from the
31+
/// `Decodable` initializer.
32+
///
33+
/// This is used during encoding to determine whether to filter ``url`` through the
34+
/// `renderURL(for:)` method. In case the URL was loaded from JSON, we don't want to modify it
35+
/// further after a round-trip.
3036
private var urlWasDecoded = false
3137

3238
/// The SHA512 hash value for the resource.

0 commit comments

Comments
 (0)