diff --git a/packages/astro-md/middleware.ts b/packages/astro-md/middleware.ts index 58c938d..624afae 100644 --- a/packages/astro-md/middleware.ts +++ b/packages/astro-md/middleware.ts @@ -7,7 +7,7 @@ import { remarkObsidian } from "../remark-obsidian"; import remarkFrontmatter from "remark-frontmatter"; const decode = (str: string) => - str.replace(/&#x(\d+);/g, (_, hex) => String.fromCharCode(parseInt(hex, 16))); + str.replace(/&#x(\w+);/g, (_, hex) => String.fromCharCode(parseInt(hex, 16))); const theme = "nord";