From cb3b59d07545b2a8e9530427a3fb9bb297aac3f3 Mon Sep 17 00:00:00 2001 From: Eric Lau <44459660+erxclau@users.noreply.github.com> Date: Mon, 13 Nov 2023 20:44:33 -0500 Subject: [PATCH] Import he namespace (#18) --- index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.ts b/index.ts index 83a9b24..606ac7d 100644 --- a/index.ts +++ b/index.ts @@ -1,6 +1,6 @@ import type { HTMLElement } from "node-html-parser"; import { parse } from "node-html-parser"; -import { decode } from "he"; +import he from "he"; export type Image = { html: string; @@ -264,7 +264,7 @@ export async function fetchPostFromSlug( return { url: story.link as string, - title: decode(story.title.rendered) as string, + title: he.decode(story.title.rendered) as string, coauthors: joinListOfStrings( story.coauthors.map((author) => author.display_name) ),