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 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ function hook_clickat_render_linklist($data)
'/([^\S]+)@([\w]+)/' => ' <a href="https://twitter.com/\2">&commat;\2</a>'
);
foreach ($data['links'] as &$value) {
if (strpos($value['description'], '@') !== false) {
if (strpos($value['description'], ' @') !== false) {
foreach($patterns as $nic => $link) {
$value['description'] = preg_replace($nic, $link, $value['description']);
}