Add support for prepending URL with '<' and appending with '>'
This commit is contained in:
parent
340727ae60
commit
09eee1a0ca
1 changed files with 3 additions and 0 deletions
|
@ -16,6 +16,9 @@ module.exports = {
|
|||
let url;
|
||||
|
||||
if(args.length > 0){
|
||||
if(args[0].charAt(0) === '<' && args[0].charAt(args[0].length - 1) === '>'){
|
||||
args[0] = args[0].slice(0, args[0].length - 1)
|
||||
}
|
||||
try {
|
||||
url = new URL(args[0]);
|
||||
url = url.href;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue