提交 0fccee82 编写于 作者: D 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
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册