Dont parse gfm-extractions as commit. Increase gfm rendering speed. Especially for a lot of code snippets
This commit is contained in:
parent
9b1b5aee83
commit
0fccee82b7
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue