Skip to content

Commit bd05613

Browse files
author
juniorbutyeah
committed
fix biome stuff
1 parent b2387bc commit bd05613

1 file changed

Lines changed: 3 additions & 18 deletions

File tree

src/lib/text-canvas.ts

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
1-
import { parse, HTMLElement, NodeType, type Node, type TextNode } from "node-html-parser";
1+
import { type HTMLElement, type Node, NodeType, parse, type TextNode } from "node-html-parser";
22

3-
const SKIP_TAGS = new Set([
4-
"script",
5-
"style",
6-
"noscript",
7-
"svg",
8-
"template",
9-
"textarea",
10-
"code",
11-
"pre",
12-
]);
3+
const SKIP_TAGS = new Set(["script", "style", "noscript", "svg", "template", "textarea", "code", "pre"]);
134
const SKIP_TAGS_ARRAY = [...SKIP_TAGS];
145

156
const ATTR_KEYS = ["aria-label", "alt"];
@@ -80,13 +71,7 @@ function walk(node: Node, key: number): void {
8071
if (tag === "meta") {
8172
const name = (el.getAttribute("name") || "").toLowerCase();
8273
const prop = (el.getAttribute("property") || "").toLowerCase();
83-
const match =
84-
name === "description" ||
85-
name === "twitter:description" ||
86-
name === "twitter:title" ||
87-
prop === "og:description" ||
88-
prop === "og:title" ||
89-
prop === "og:site_name";
74+
const match = name === "description" || name === "twitter:description" || name === "twitter:title" || prop === "og:description" || prop === "og:title" || prop === "og:site_name";
9075
if (match) {
9176
const content = el.getAttribute("content") || "";
9277
if (content && !isWhitespace(content)) {

0 commit comments

Comments
 (0)