FIX: Use link references to shorten markdown

FIX: Use link references to shorten markdown

diff --git a/lib/chart_helper.rb b/lib/chart_helper.rb
index cc4b43e..f109d30 100644
--- a/lib/chart_helper.rb
+++ b/lib/chart_helper.rb
@@ -53,6 +53,7 @@ module ::DevAdditions
       end
 
       markdown = +""
+      markdown_links = {}
 
       benches.each do |name, metrics|
         result_type = metrics[0][:type]
@@ -90,7 +91,8 @@ module ::DevAdditions
           percent = ((top_duration - (top_duration - row[:duration])) / top_duration) * 100
           percent = "#{percent.round(2)}%"
           desc = row[:description].gsub("|", "\\|")
-          user_link = "[#{row[:username]}](#{post.topic.url}/#{row[:post_number]})"
+          user_link = "[#{row[:username]}][#{row[:post_number]}]"
+          markdown_links[row[:post_number]] = "#{post.topic.url}/#{row.post_number}"
 
           markdown << <<~MD
           #{desc}|#{user_link}|#{row[:duration]}|#{row[:variance]}|#{percent}|
@@ -98,6 +100,9 @@ module ::DevAdditions
         end
       end
 
+      markdown << "\n"
+      markdown_links.each { |post_number, link| markdown << "[#{post_number}]: #{link}\n"}
+
       op = Post.find_by(topic_id: post.topic_id, post_number: 1)
       raw = op.raw.split("<!--AUTO-->", 3)
       raw[1] = markdown

GitHub sha: 0bc91c7c