Compare commits
1 commit
745ac3077d
...
cdba58fb21
Author | SHA1 | Date | |
---|---|---|---|
cdba58fb21 |
1 changed files with 3 additions and 3 deletions
|
@ -12,9 +12,9 @@ use Shaarli\Render\TemplatePage;
|
|||
function hook_clickat_render_linklist($data)
|
||||
{
|
||||
$patterns = array(
|
||||
'/([^\S]+)@([\w]+).bsky.social/' => ' <a href="https://bsky.app/profile/\2.bsky.social">@\2.bsky.social</a>',
|
||||
'/([^\S]+)@([\w]+)@([\w_\-\.]+)/' => ' <a href="https://\3/@\2">@\2</a>',
|
||||
'/([^\S]+)@([\w]+)/' => ' <a href="https://twitter.com/\2">@\2</a>'
|
||||
'/([^\S]+)@([\w]+).bsky.social/' => '\1<a href="https://bsky.app/profile/\2.bsky.social">@\2.bsky.social</a>',
|
||||
'/([^\S]+)@([\w]+)@([\w_\-\.]+)/' => '\1<a href="https://\3/@\2">@\2</a>',
|
||||
'/([^\S]+)@([\w]+)/' => '\1<a href="https://twitter.com/\2">@\2</a>'
|
||||
);
|
||||
foreach ($data['links'] as &$value) {
|
||||
if (strpos($value['description'], '@') !== false) {
|
||||
|
|
Loading…
Add table
Reference in a new issue