fix(common): parentheses and single quotes support to curl imports (#3509)

This commit is contained in:
Muhammed Ajmal M
2023-12-04 23:03:22 +05:30
committed by GitHub
parent 2528bbb92f
commit 8d5a456dbd

View File

@@ -49,7 +49,12 @@ const parseURL = (urlText: string | number) =>
urlText,
O.fromNullable,
// preprocess url string
O.map((u) => u.toString().replaceAll(/[^a-zA-Z0-9_\-./?&=:@%+#,;\s]/g, "")),
O.map((u) =>
u
.toString()
.replace(/^'|'$/g, "")
.replaceAll(/[^a-zA-Z0-9_\-./?&=:@%+#,;()'\s]/g, "")
),
O.filter((u) => u.length > 0),
O.chain((u) =>
pipe(