Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOswaldo Ferreira <oswaldo@gitlab.com>2019-03-13 16:57:05 +0300
committerOswaldo Ferreira <oswaldo@gitlab.com>2019-03-20 17:30:24 +0300
commit53a59604964b2cff06b4e25401acae50b1f82d3e (patch)
treee22722ab521ae524c7f59e5a2ed3d806d2217087 /lib/gitlab/diff
parent74ebeebbcdbe5a996610fa02711f0563b4a774fa (diff)
Implement multi-line suggestions filtering
Implements the filtering logic for `suggestion:-x+y` syntax.
Diffstat (limited to 'lib/gitlab/diff')
-rw-r--r--lib/gitlab/diff/suggestions_parser.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/gitlab/diff/suggestions_parser.rb b/lib/gitlab/diff/suggestions_parser.rb
new file mode 100644
index 00000000000..043bd9a4bcb
--- /dev/null
+++ b/lib/gitlab/diff/suggestions_parser.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+module Gitlab
+ module Diff
+ class SuggestionsParser
+ # Matches for instance "-1", "+1" or "-1+2".
+ SUGGESTION_CONTEXT = /^(\-(?<above>\d+))?(\+(?<below>\d+))?$/.freeze
+ end
+ end
+end