We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
strict
1 parent 5d21241 commit 0987003Copy full SHA for 0987003
lib/index.js
@@ -2,7 +2,9 @@ const qs = require('query-string')
2
const isUrl = require('is-url-superb')
3
const matchHelper = require('posthtml-match-helper')
4
5
-module.exports = config => tree => {
+module.exports = (config = {}) => tree => {
6
+ config.strict = config.strict ?? true
7
+
8
const process = node => {
9
if (!config || !config.parameters) {
10
return node
@@ -14,7 +16,7 @@ module.exports = config => tree => {
14
16
const url = node.attrs.href
15
17
const parsed = qs.parseUrl(url, config.qs)
18
- if (isUrl(parsed.url.trim()) === false) {
19
+ if (config.strict && !isUrl(parsed.url.trim())) {
20
21
}
22
0 commit comments