Reduce chain
parent
af226ab160
commit
23b0b2d972
|
@ -40,13 +40,8 @@ export function parseF95ThreadPost(
|
||||||
const elements = post
|
const elements = post
|
||||||
.contents()
|
.contents()
|
||||||
.toArray()
|
.toArray()
|
||||||
.map((el) => {
|
.map((el) => parseCheerioNode($, el))
|
||||||
const node = parseCheerioNode($, el);
|
.filter((node) => node.name || node.text || node.content.length != 0);
|
||||||
if (node.name || node.text || node.content.length != 0) {
|
|
||||||
return node;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.filter((el) => el);
|
|
||||||
|
|
||||||
// ... then parse the elements to create the pairs of title/data
|
// ... then parse the elements to create the pairs of title/data
|
||||||
return parsePostElements(elements);
|
return parsePostElements(elements);
|
||||||
|
|
Loading…
Reference in New Issue