From bc683b2387d437783e7e3d9bbb247588a970a2a9 Mon Sep 17 00:00:00 2001 From: MillenniumEarl Date: Mon, 22 Mar 2021 14:18:57 +0100 Subject: [PATCH] Add special values in isValidTitleElement --- src/scripts/scrape-data/post-parse.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/scripts/scrape-data/post-parse.ts b/src/scripts/scrape-data/post-parse.ts index 798f0f7..3837005 100644 --- a/src/scripts/scrape-data/post-parse.ts +++ b/src/scripts/scrape-data/post-parse.ts @@ -431,8 +431,6 @@ function pairUpElements(elements: IPostElement[]): IPostElement[] { .filter((e, i) => isValidTitleElement(e, i, shallow)) .map((e) => shallow.indexOf(e)); - //if (indexes.length === 0) indexes = shallow.map((e, i) => i); - // Now we find all the elements between indexes and // associate them with the previous "title" element return indexes.map((i, j) => parseGroupData(i, j, indexes, shallow)); @@ -452,7 +450,7 @@ function isValidTitleElement(element: IPostElement, index: number, array: IPostE element.type === "Text" && (isPostfixDoublePoints || nextElementIsValue); // Special values tha must be set has "title" - const specialValues = ["DOWNLOAD"]; + const specialValues = ["DOWNLOAD", "CHANGELOG", "CHANGE-LOG", "GENRE"]; const specialTypes = ["Image"]; // Used to ignore already merged elements with name (ignore spoilers)