Jacky Zhao
2023-09-15 5dcb7e83fc3c8383ebbc84aac4553df4ad3ef59a
quartz/util/path.ts
@@ -52,7 +52,7 @@
  let slug = withoutFileExt
    .split("/")
    .map((segment) => segment.replace(/\s/g, "-")) // slugify all segments
    .map((segment) => segment.replace(/\s/g, "-").replace(/%/g, "-percent")) // slugify all segments
    .join("/") // always use / as sep
    .replace(/\/$/, "") // remove trailing slash
@@ -123,7 +123,10 @@
}
export function joinSegments(...args: string[]): string {
  return args.filter((segment) => segment !== "").join("/")
  return args
    .filter((segment) => segment !== "")
    .join("/")
    .replace(/\/\/+/g, "/")
}
export function getAllSegmentPrefixes(tags: string): string[] {