diff --git a/Library/Sources/Internal/Enumerations/AssetPrefix.swift b/Library/Sources/Internal/Enumerations/AssetPrefix.swift index 621859e..c358b80 100644 --- a/Library/Sources/Internal/Enumerations/AssetPrefix.swift +++ b/Library/Sources/Internal/Enumerations/AssetPrefix.swift @@ -25,7 +25,7 @@ extension AssetPrefix: Pathable { // MARK: Computed var path: String { - .init(format: .Format.Path.root, rawValue) + .init(format: .Format.Path.folder, rawValue) } } diff --git a/Library/Sources/Internal/Extensions/String+Formats.swift b/Library/Sources/Internal/Extensions/String+Formats.swift index e64d658..fddf08a 100644 --- a/Library/Sources/Internal/Extensions/String+Formats.swift +++ b/Library/Sources/Internal/Extensions/String+Formats.swift @@ -3,13 +3,15 @@ extension String { enum Format { /// A namespace that defines the format patterns used to generate relative path representations. enum Path { - /// A representation of the format pattern used to generate relative paths that starts with the `/` string and finishes with the `.doccarchive` string. + /// A format pattern used to generate relative paths that starts with the `/` string and finishes with the `.doccarchive` string. static let archive = "/%@.doccarchive" - /// A representation of the format pattern used to generate relative paths that starts with the `/data` string. + /// A format pattern used to generate relative paths that starts with the `/data` string. static let data = "/data/%@" - /// A representation of the format pattern used to generate relative paths that starts with the `/docs` string. + /// A format pattern used to generate relative paths that starts with the `/docs` string. static let docs = "/docs/%@" - /// A representation of the format pattern used to generate relative paths that starts with the `/` string. + /// A format pattern used to generate relative paths that starts and finishes with the `/` string. + static let folder = "/%@/" + /// A format pattern used to generate relative paths that starts with the `/` string. static let root = "/%@" } } diff --git a/Test/Sources/Cases/Internal/Enumerations/AssetPrefixTests.swift b/Test/Sources/Cases/Internal/Enumerations/AssetPrefixTests.swift index 43f39e8..c1db3fa 100644 --- a/Test/Sources/Cases/Internal/Enumerations/AssetPrefixTests.swift +++ b/Test/Sources/Cases/Internal/Enumerations/AssetPrefixTests.swift @@ -29,14 +29,14 @@ private extension Collection where Element == String { // MARK: Properties static var paths: [Element] {[ - "/css", - "/data", - "/downloads", - "/images", - "/img", - "/index", - "/js", - "/videos" + "/css/", + "/data/", + "/downloads/", + "/images/", + "/img/", + "/index/", + "/js/", + "/videos/" ]} }