There was an error while loading. Please reload this page.
1 parent 9a04f1e commit d7aac14Copy full SHA for d7aac14
1 file changed
src/website-content-crawler/text-extractor.ts
@@ -36,6 +36,10 @@ export async function readableText({
36
37
const readabilityRoot = parsed?.content as HTMLElement | null;
38
39
+ if (options?.fallbackToNone && !readabilityRoot?.textContent?.trim()) {
40
+ return html;
41
+ }
42
+
43
if (readabilityRoot && parsed?.title) {
44
const titleElement = dom.window.document.createElement('h1');
45
titleElement.textContent = parsed.title;
0 commit comments