瀏覽代碼

Fixing parsing for usernames and hashtags

logicp 7 年之前
父節點
當前提交
9caf529917
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/Entity/Heartbeat.php

+ 2 - 0
src/Entity/Heartbeat.php

@@ -438,6 +438,8 @@ class Heartbeat extends RevisionableContentEntityBase implements HeartbeatInterf
         $parsedMessage = $tokenService->replace($preparsedMessage . '<a class="heartbeat-node" href="/node/[node:nid]">', $entities);
         if (strpos($parsedMessage, '#')) {
           self::parseHashtags($parsedMessage);
+        }
+        if (strpos($parsedMessage, '@')) {
           self::parseUsernames($parsedMessage);
         }
         /** @noinspection NestedTernaryOperatorInspection */