Merge branch 'develop' into dai_ao
This commit is contained in:
commit
581250cfea
|
@ -2,12 +2,12 @@ module PullRequestsHelper
|
||||||
|
|
||||||
# 获取diff内容行号
|
# 获取diff内容行号
|
||||||
def diff_line_num content
|
def diff_line_num content
|
||||||
content.scan(/@@ -(\d+),\d+ \+\d+,\d+ @@/).first.nil? ? "" : content.scan(/@@ -(\d+),\d+ \+\d+,\d+ @@/).first.join("").to_i
|
result = content.scan(/@@ -(\d+),\d+ \+\d+,\d+ @@/).first.nil? ? "" : content.scan(/@@ -(\d+),\d+ \+\d+,\d+ @@/).first.join("").to_i
|
||||||
end
|
end
|
||||||
|
|
||||||
# 处理内容
|
# 处理内容
|
||||||
def diff_content content
|
def diff_content content
|
||||||
content.gsub!(/.*@@ -\d+,\d+ \+\d+,\d+ @@\n/m,'')
|
result = content.gsub!(/.*@@.*@@\n/m,'')
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_user_name user_id
|
def get_user_name user_id
|
||||||
|
|
Loading…
Reference in New Issue