Skip to content

Commit 14e6771

Browse files
committed
fmt & fix
1 parent 5b37e2e commit 14e6771

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/content/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { idToDateSlug } from "@/utils/blog";
55

66
const localizedGlob = (base: string, slugify?: (slug: string) => string) =>
77
glob({
8-
pattern: `{${localeKeys.join(",")}}/**/[^_]*.md`,
8+
pattern: `@(${localeKeys.join("|")})/**/[^_]*.md`,
99
base,
1010
generateId: ({ entry }) => {
1111
const id = entry.replace(/\.md$/, "");

src/middleware.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ const shouldSkip = (p: string): boolean =>
2525

2626
const localePrefixRewriter = (prefix: string) => {
2727
const prefixAttr = (attr: "href" | "src") => ({
28-
element(el: { getAttribute(n: string): string | null; setAttribute(n: string, v: string): void }) {
28+
element(el: {
29+
getAttribute(n: string): string | null;
30+
setAttribute(n: string, v: string): void;
31+
}) {
2932
const v = el.getAttribute(attr);
3033
if (!v || shouldSkip(v)) return;
3134
el.setAttribute(attr, prefix + v);

0 commit comments

Comments
 (0)