From d9289b88b2fb109820507e00b7eda39ed3630f82 Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Tue, 17 Dec 2024 16:50:57 -0600 Subject: [PATCH] use utf-8 --- plugin/remark-agda.ts | 1 + plugin/remark-reading-time.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugin/remark-agda.ts b/plugin/remark-agda.ts index 724d08f..f71b817 100644 --- a/plugin/remark-agda.ts +++ b/plugin/remark-agda.ts @@ -94,6 +94,7 @@ const remarkAgda: RemarkPlugin = ({ base, publicDir }: Options) => { + diff --git a/plugin/remark-reading-time.ts b/plugin/remark-reading-time.ts index 9664d65..7f3f5b6 100644 --- a/plugin/remark-reading-time.ts +++ b/plugin/remark-reading-time.ts @@ -1,10 +1,10 @@ import getReadingTime from "reading-time"; -import { toString } from "mdast-util-to-string"; +import { toString as mdastToString } from "mdast-util-to-string"; import type { RemarkPlugin } from "@astrojs/markdown-remark"; const remarkReadingTime: RemarkPlugin = () => { return (tree, { data }) => { - const textOnPage = toString(tree); + const textOnPage = mdastToString(tree); const readingTime = getReadingTime(textOnPage); // readingTime.text will give us minutes read as a friendly string,