Skip to content

Commit 3cbad9d

Browse files
committed
Fix article text bug
1 parent a2c8dc2 commit 3cbad9d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ForPDA/Sources/Services/Parsing/ParsingService.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@ final class ParsingService {
317317
}
318318
}
319319
} else if try! element.iS("h2") || (try! element.iS("h3")) {
320+
guard try! !element.text().isEmpty else { continue }
320321
try! element.select("br").remove()
321322
let text = try! element.html()
322323
articleElements.append(TextElement(text: text, isHeader: true))

0 commit comments

Comments
 (0)