Fixed the output of the "path" computed property for the AssetPrefix enumeration in the library target.

This commit is contained in:
Javier Cicchelli 2025-03-08 12:26:11 +01:00
parent 39a9523ac9
commit 5b379fbc86
3 changed files with 15 additions and 13 deletions

View File

@ -25,7 +25,7 @@ extension AssetPrefix: Pathable {
// MARK: Computed
var path: String {
.init(format: .Format.Path.root, rawValue)
.init(format: .Format.Path.folder, rawValue)
}
}

View File

@ -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 = "/%@"
}
}

View File

@ -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/"
]}
}