no idea whats wrong at github
This commit is contained in:
parent
632a134fda
commit
eac72b0b7b
|
@ -12,7 +12,9 @@ const parseOpts = {
|
|||
|
||||
function collectHrefsFromDescription(description) {
|
||||
// first thought: use parser.parse() and traverse recursively. turned out to be way too slow.
|
||||
const links = description.match(/href="([^"]*")/g)
|
||||
const x = description.match(/href="([^"]*")/g)
|
||||
console.log(x)
|
||||
const links = x
|
||||
.map(match => match.replace("href=", "").replaceAll("\"", ""))
|
||||
.filter(match => !(/\.(gif|zip|rar|bz2|gz|7z|jpe?g|tiff?|png|webp|bmp)$/i).test(match))
|
||||
.filter(match => !config.disallowedWebmentionDomains.some(domain => match.indexOf(domain) >= 0))
|
||||
|
|
Loading…
Reference in New Issue