Fix page paths

Update PostListPageGenerator.swift
This commit is contained in:
Christoph Hagen
2025-01-07 10:31:46 +01:00
parent f8150e0809
commit dd2b7d6cd2
7 changed files with 31 additions and 8 deletions

View File

@ -16,6 +16,13 @@ extension String {
return decoded
}
var withLeadingSlashRemoved: String {
if !hasPrefix("/") {
return self
}
return String(dropFirst("/".count))
}
var removingSurroundingQuotes: String {
if hasPrefix("\"") && hasSuffix("\"") {
return dropBeforeFirst("\"").dropAfterLast("\"")