diff --git a/lib/gitlab/markdown.rb b/lib/gitlab/markdown.rb
index 41bb8d0892437e3985339e9ff20b02b89fee9b96..48a589db8372fd09262281eb5b0519f0fb42b1a4 100644
--- a/lib/gitlab/markdown.rb
+++ b/lib/gitlab/markdown.rb
@@ -70,8 +70,6 @@ module Gitlab
 
       # TODO: add popups with additional information
 
-      text = parse(text, project)
-
       # Insert pre block extractions
       text.gsub!(/\{gfm-extraction-(\h{32})\}/) do
         insert_piece($1)
@@ -120,6 +118,8 @@ module Gitlab
 
       text = result[:output].to_html(save_with: saveoptions)
 
+      text = parse(text, project)
+
       if options[:parse_tasks]
         text = parse_tasks(text)
       end
@@ -141,7 +141,7 @@ module Gitlab
       @extractions[id]
     end
 
-    # Private: Parses text for references and emoji
+    # Private: Parses text for references
     #
     # text - Text to parse
     #