diff --git a/packages/astro-md/middleware.ts b/packages/astro-md/middleware.ts index 1b9b457..40af9d4 100644 --- a/packages/astro-md/middleware.ts +++ b/packages/astro-md/middleware.ts @@ -6,15 +6,8 @@ import { normalizeFrontmatter } from "../my-remark"; import { remarkObsidian } from "../remark-obsidian"; import remarkFrontmatter from "remark-frontmatter"; -function isULID(str: string) { - // ULID regex to validate the format - const ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i; - return ulidRegex.test(str); -} - export const onRequest = defineMiddleware(async (context, next) => { const fileResolver = async (path: string) => { - if (isULID(path)) return path; return (await context.locals.runtime.env.KV_MAPPINGS.get(path)) ?? path; }; const processor = await createMarkdownProcessor({