debugging: cheerio isn't always consistent in setting scores
parent
47ac7e9803
commit
74694ba8e2
File diff suppressed because one or more lines are too long
@ -1,7 +1,12 @@
|
||||
import { REMOVE_EMPTY_SELECTORS } from './constants'
|
||||
|
||||
export default function removeEmpty(article, $) {
|
||||
$(REMOVE_EMPTY_SELECTORS, article).remove()
|
||||
export default function removeEmpty($article, $) {
|
||||
// $(REMOVE_EMPTY_SELECTORS, $article).remove()
|
||||
|
||||
$article.find('p').each((index, p) => {
|
||||
const $p = $(p)
|
||||
if ($p.text().trim() === '') $p.remove()
|
||||
})
|
||||
|
||||
return $
|
||||
}
|
||||
|
Loading…
Reference in New Issue