diff --git a/lib/gitlab/markdown.rb b/lib/gitlab/markdown.rb index ad6ba3e..05c118b 100644 --- a/lib/gitlab/markdown.rb +++ b/lib/gitlab/markdown.rb @@ -101,6 +101,7 @@ module Gitlab |!(?\d+) # MR ID |\$(?\d+) # Snippet ID |(?[\h]{6,40}) # Commit ID + |(?gfm-extraction-[\h]{6,40}) # Skip gfm extractions. Otherwise will be parsed as commit ) (?\W)? # Suffix }x.freeze @@ -113,6 +114,9 @@ module Gitlab prefix = $~[:prefix] suffix = $~[:suffix] type = TYPES.select{|t| !$~[t].nil?}.first + + next unless type + identifier = $~[type] # Avoid HTML entities -- libgit2 0.21.2