Skip to content

Commit

Permalink
Import he namespace (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
erxclau authored Nov 14, 2023
1 parent 429eabb commit cb3b59d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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)
),
Expand Down

0 comments on commit cb3b59d

Please sign in to comment.