Commit 0fccee82 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Dont parse gfm-extractions as commit. Increase gfm rendering speed. Especially...

Dont parse gfm-extractions as commit. Increase gfm rendering speed. Especially for a lot of code snippets
parent 9b1b5aee
......@@ -101,6 +101,7 @@ module Gitlab
|!(?<merge_request>\d+) # MR ID
|\$(?<snippet>\d+) # Snippet ID
|(?<commit>[\h]{6,40}) # Commit ID
|(?<skip>gfm-extraction-[\h]{6,40}) # Skip gfm extractions. Otherwise will be parsed as commit
)
(?<suffix>\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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment