-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Your autolinking feature is awesome. But it would be even better if there could be either
- an annotation
- a config option
```shell
composer install torchlight-api/torchlight [tl! autolink]
```
to allow for non-http(s) and non-www URLs to be linked which either
- just have different scheme/protocol (could be turned on by either an object whose value is
true
or an array list) - requires mapping (which could be implemented with either a function or regexp replacements)
<?php
return [
'links' => [
// either
'protocols' => [ 'https', 'ftp', 'vscode' ],
// or
'protocols' => [
'https' => true,
'http' => false,
// or
'ftp' => [ '/^ftp:\/\/(?<username>(.*)(?=:)):(?<password>(.*)(?=@))@(.*)$/', 'ftp://$url?username=$username&password=$password' ],
// or
'vscode' => fn (string $url) => explode('?', $url)[0],
],
],
];
Metadata
Metadata
Assignees
Labels
No labels