]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
New length format for other kinds of mentions
authorStephen Paul Weber <singpolyma@singpolyma.net>
Wed, 28 Oct 2015 00:15:08 +0000 (00:15 +0000)
committerStephen Paul Weber <singpolyma@singpolyma.net>
Wed, 28 Oct 2015 00:15:08 +0000 (00:15 +0000)
lib/util.php

index f31812349b2d9814410f956d01fa7e6d611bc86a..8eb44c372a7756316b290ddf48d57513a1a80c62 100644 (file)
@@ -794,6 +794,7 @@ function common_find_mentions($text, Notice $notice)
                                 'type'      => 'list',
                                 'text' => $hmatch[0],
                                 'position' => $hmatch[1],
+                                'length' => mb_strlen($hmatch[0]),
                                 'url' => $url);
         }
 
@@ -813,6 +814,7 @@ function common_find_mentions($text, Notice $notice)
                                 'type'      => 'group',
                                 'text'      => $hmatch[0],
                                 'position'  => $hmatch[1],
+                                'length'    => mb_strlen($hmatch[0]),
                                 'url'       => $group->permalink(),
                                 'title'     => $group->getFancyName());
         }