fix error

This commit is contained in:
daniel-j 2020-10-26 11:17:59 +01:00
parent 24a2dd02dc
commit c5dd2fd323

View file

@ -83,7 +83,7 @@ export function htmlToText (html, options = {}) {
export function htmlWordCount (html) {
html = html.replace(/<pre>.*?<\/pre>/g, '') // Ignore codeblocks
let text = htmlToText(html)
text = text.replace(urlRegexSafe(), '') // Remove urls
text = text.replace(urlRegexSafe({ tlds: [] }), '') // Remove urls
let count = 0
try {