formatter: improve microformats markup
authorWilliam Pitcock <nenolod@dereferenced.org>
Wed, 16 Jan 2019 03:53:36 +0000 (03:53 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Wed, 16 Jan 2019 03:54:01 +0000 (03:54 +0000)
lib/pleroma/formatter.ex

index d80ae6576cd071b3e9b49a35a0bdb43c25d2699c..4149265a22a1e55454c9cc3f1e4235d290646782 100644 (file)
@@ -145,7 +145,9 @@ defmodule Pleroma.Formatter do
           short_match = String.split(match, "@") |> tl() |> hd()
 
           {uuid,
-           "<span><a data-user='#{id}' class='mention' href='#{ap_id}'>@<span>#{short_match}</span></a></span>"}
+           "<span class='h-card'><a data-user='#{id}' class='u-url mention' href='#{ap_id}'>@<span>#{
+             short_match
+           }</span></a></span>"}
         end)
 
     {subs, uuid_text}
@@ -168,7 +170,7 @@ defmodule Pleroma.Formatter do
       subs ++
         Enum.map(tags, fn {tag_text, tag, uuid} ->
           url =
-            "<a data-tag='#{tag}' href='#{Pleroma.Web.base_url()}/tag/#{tag}' rel='tag'>#{
+            "<a class='hashtag' data-tag='#{tag}' href='#{Pleroma.Web.base_url()}/tag/#{tag}' rel='tag'>#{
               tag_text
             }</a>"