Compare commits

..

1 Commits

Author SHA1 Message Date
n cf52ed2036
regex fixes
lint / lint (push) Successful in 15s Details
2024-02-25 20:34:47 +01:00
1 changed files with 2 additions and 2 deletions

View File

@ -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">&commat;\2.bsky.social</a>',
'/([^\S]+)@([\w]+).bsky.social/' => ' <a href="https://bsky.app/profile/\2.bsky.social">&commat;\2.bsky.social</a>',
'/([^\S]+)@([\w]+)@([\w_\-\.]+)/' => ' <a href="https://\3/@\2">&commat;\2</a>',
'/([^\S]+)@([\w]+)/' => ' <a href="https://twitter.com/\2">&commat;\2</a>'
'/([^\S]+)@([\w]+)/' => ' <a href="https://twitter.com/\2">&commat;\2</a>'
);
foreach ($data['links'] as &$value) {
if (strpos($value['description'], ' @') !== false) {