From fdc944ecbff3fbf0d1994c4078ac58ecfaec0996 Mon Sep 17 00:00:00 2001 From: MillenniumEarl Date: Sun, 21 Mar 2021 19:13:35 +0100 Subject: [PATCH] Replace "el" with "e" --- src/scripts/scrape-data/post-parse.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/scripts/scrape-data/post-parse.ts b/src/scripts/scrape-data/post-parse.ts index 32f344a..36ce5a1 100644 --- a/src/scripts/scrape-data/post-parse.ts +++ b/src/scripts/scrape-data/post-parse.ts @@ -118,8 +118,8 @@ function isLinkNode(node: cheerio.Element): boolean { // The node is a valid DOM element if (node.type === "tag") { - const el = node as cheerio.TagElement; - valid = el.name === "a" || el.name === "img"; + const e = node as cheerio.TagElement; + valid = e.name === "a" || e.name === "img"; } return valid; @@ -189,7 +189,7 @@ function parseCheerioSpoilerNode($: cheerio.Root, node: cheerio.Cheerio): IPostE .find(POST.SPOILER_CONTENT) .contents() .toArray() - .map((el) => parseCheerioNode($, el)); + .map((e) => parseCheerioNode($, e)); // Clean text (Spoiler has no text) @todo // spoiler.text = spoiler.text.replace(/\s\s+/g, " ").trim(); @@ -320,7 +320,7 @@ function getCheerioNonChildrenText(node: cheerio.Cheerio): string { text = node .first() .contents() // @todo Change to children() after cheerio RC6 - .filter((idx, el) => isTextNode(el)) + .filter((idx, e) => isTextNode(e)) .text(); }