Skip to content

Commit c37caeb

Browse files
committed
fix: has url, close #2
1 parent ddfba62 commit c37caeb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
const isUrl = require('is-url-superb')
3+
const urlRegex = require('url-regex')({exact: true});
44
const qs = require('query-string')
55

66
module.exports = config => tree => {
@@ -15,7 +15,7 @@ module.exports = config => tree => {
1515
const url = node.attrs.href
1616
const parsed = qs.parseUrl(url)
1717

18-
if (!isUrl(parsed.url)) {
18+
if (urlRegex.test(parsed.url.trim()) === false) {
1919
return node
2020
}
2121

0 commit comments

Comments
 (0)