Pārlūkot izejas kodu

Amending hashtag parsing

logicp 7 gadi atpakaļ
vecāks
revīzija
2f9e3c22f6
1 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. 3 1
      src/Entity/Heartbeat.php

+ 3 - 1
src/Entity/Heartbeat.php

@@ -576,7 +576,9 @@ class Heartbeat extends RevisionableContentEntityBase implements HeartbeatInterf
       if (count($tid) > 0) {
         $term = Term::load(array_values($tid)[0]);
         $link = Link::fromTextAndUrl('#' . $hashtag, $term->toUrl());
-        $tagsArray[$i] = !$lastRow ? $link->toString() : $link->toString() . $remainder;
+        $tagsArray[$i] = '<div class="heartbeat-hashtag">';
+        $tagsArray[$i] .= !$lastRow ? $link->toString() : $link->toString() . $remainder;
+        $tagsArray[$i] .= '</div>';
       }
       $i++;