From ec00a40aefca73596ab76e3ebe3a8e1129b43688 Mon Sep 17 00:00:00 2001
From: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 27 Jan 2026 18:27:17 +0000
Subject: [PATCH] chore(deps): bump the production-dependencies group with 4 updates (#2289)
---
quartz/util/path.ts | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/quartz/util/path.ts b/quartz/util/path.ts
index 0681fae..b957701 100644
--- a/quartz/util/path.ts
+++ b/quartz/util/path.ts
@@ -1,6 +1,7 @@
import { slug as slugAnchor } from "github-slugger"
import type { Element as HastElement } from "hast"
import { clone } from "./clone"
+
// this file must be isomorphic so it can't use node libs (e.g. path)
export const QUARTZ = "quartz"
@@ -39,6 +40,15 @@
return validStart && validEnding && ![".md", ".html"].includes(getFileExtension(s) ?? "")
}
+export function isAbsoluteURL(s: string): boolean {
+ try {
+ new URL(s)
+ } catch {
+ return false
+ }
+ return true
+}
+
export function getFullSlug(window: Window): FullSlug {
const res = window.document.body.dataset.slug! as FullSlug
return res
--
Gitblit v1.10.0